How to use WeightedRandomSampler with a concatenated datset

Hi . i have to two datasets on with cancer rich data and one without cancer in its labels . I am trying to run a segementation algorithm by sampling 75% time from cancer rich dataset . I thought i could use weightedrandomsampler to achive this …but i am stuck ,as most of the examples for the sampler are class label based .Can someone help me with an example code ?