Multiple sampling of data

I have a small question. I am using

torch.utils.data.WeightedRandomSampler

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 torch.utils.data.WeightedRandomSampler to balance cats and dogs.

Can anyone help me with How to do it?