class_docstr: Adapted from `torch.utils.data.distributed.DistributedSampler`.
code: def __len__(self):
      return self.num_samples
  
file_path: ludwig/ludwig/data/sampler.py
imports: import math
  import numpy
  from ludwig.distributed import DistributedStrategy
  from ludwig.utils.defaults import default_random_seed
label_desc: Use image node_id 3 for calling the DistributedSampler obj's underlying member method code with example usage: obj.__len__() and returns: self