class_docstr: Use this to upsample rare classes and downsample common classes in your unbalanced classification dataset.
code: def __iter__(self):
      return (
          self.indices[i]
          for i in torch.multinomial(
              self.weights, self.num_samples, replacement=True
          )
      )
  
imports: import logging
  import random
  from collections import defaultdict
  from typing import Dict
  import torch
  from torch.utils.data.sampler import Sampler
label_desc: Use image node_id 3 for calling the ImbalancedClassificationDatasetSampler obj's underlying member method code with example usage: obj.__iter__() and returns: unknown