class_docstr: Sampler that restricts data loading to a subset of the dataset for distributed,
  with repeated augmentation.
  It ensures that different each augmented version of a sample will be visible to a
  different process (GPU).
  Heavily based on 'torch.utils.data.DistributedSampler'.
  
  This is borrowed from the DeiT Repo:
  https://github.com/facebookresearch/deit/blob/main/samplers.py
code: def __iter__(self):
      if self.shuffle:
          # Deterministically shuffle based on epoch
          g = torch.Generator()
          g.manual_seed(self.seed + self.epoch)
          indices = torch.randperm(
              len(self.dataset), generator=g
          ).tolist()
      else:
          indices = list(range(len(self.dataset)))
  
      # Add extra samples to make it evenly divisible
      indices = [
          ele for ele in indices for i in range(self.repetitions)
      ]
      indices += indices[: (self.total_size - len(indices))]
      assert len(indices) == self.total_size
  
      # Subsample
      indices = indices[self.rank : self.total_size : self.num_replicas]
      assert len(indices) == self.num_samples
  
      return iter(indices[: self.num_selected_samples])
  
file_path: vision/references/classification/sampler.py
imports: import math
  import torch
  import torch.distributed
label_desc: Use image node_id 2 for calling the RASampler obj's underlying member method code with example usage: obj.__iter__() and returns: iter