This post explaining an approach to create a DistributedWeightedSampler might be helpful.
DistributedWeightedSampler