class_docstr: Base class for DistributedDataParallel Sampler.
  
  Every subclass should implement `__iter__` method, providing a way to iterate
  over indices of dataset elements.
  
  Args:
      opts: command line argument
      n_data_samples: Number of samples in the dataset
      is_training: Training or validation mode. Default: False
class_docstr_tok: ["Base","class","for","DistributedDataParallel","Sampler",".","Every","subclass","should","implement","`","__iter__","`","method",",","providing","a","way","to","iterate","over","indices","of","dataset","elements",".","Args",":","opts",":","command","line","argument","n_data_samples",":","Number","of","samples","in","the","dataset","is_training",":","Training","or","validation","mode",".","Default",":","False"]
code: def __repr__(self):
      return "{}({}\n)".format(
          self.__class__.__name__, self.extra_repr()
      )
  
imports: import argparse
  import copy
  import math
  import random
  from typing import Any, Iterator, List, Tuple
  import numpy
  import torch
  import torch.distributed
  from torch.utils.data.sampler import Sampler
label_desc: Use image node_id 10 for calling the BaseSamplerDDP obj's underlying member method code with example usage: obj.__repr__() and returns: str