class_docstr: Non shuffling Distributed Sampler
class_docstr_tok: ["Non","shuffling","Distributed","Sampler"]
code: def __iter__(self):
      indices = torch.arange(len(self.dataset)).tolist()
  
      # add extra samples to make it evenly divisible
      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)
  
file_path: TTS/TTS/utils/distribute.py
imports: import math
  import torch
  import torch.distributed
  from torch._utils import _flatten_dense_tensors, _unflatten_dense_tensors
  from torch.autograd import Variable
  from torch.utils.data.sampler import Sampler
label_desc: Use image node_id 2 for calling the DistributedSampler obj's underlying member method code with example usage: obj.__iter__() and returns: iter