class_docstr: Samples elements more than once in a single pass through the data.
  
  This allows the number of samples per epoch to be larger than the number
  of samples itself, which can be useful when training on 2D slices taken
  from 3D images, for instance.
class_docstr_tok: ["Samples","elements","more","than","once","in","a","single","pass","through","the","data",".","This","allows","the","number","of","samples","per","epoch","to","be","larger","than","the","number","of","samples","itself",",","which","can","be","useful","when","training","on","2D","slices","taken","from","3D","images",",","for","instance","."]
code: def gen_sample_array(self):
      n_repeats = self.desired_samples / self.data_samples
      cat_list = []
      for i in range(math.floor(n_repeats)):
          cat_list.append(torch.arange(0, self.data_samples))
      # add the left over samples
      left_over = self.desired_samples % self.data_samples
      if left_over > 0:
          cat_list.append(
              th_random_choice(self.data_samples, left_over)
          )
      self.sample_idx_array = torch.cat(cat_list).long()
      return self.sample_idx_array
  
imports: import math
  from .utils import th_random_choice
  import torch.utils.data
  import torchvision
  from .datasets import FolderDataset, MultiFolderDataset, PredictFolderDataset, ClonedFolderDataset
  from torch.utils.data.sampler import Sampler
label_desc: Use image node_id 2 for calling the MultiSampler obj's underlying member method code with example usage: obj.gen_sample_array() and returns: self