Multiple sampling of data

I have a small question. I am using

to balance the classes between cats and dogs.
But before doing that, I want to balance between different breeds of dogs first, then I want to apply to balance cats and dogs.

Can anyone help me with How to do it?