class_docstr: Class representing a dataset abstraction.
  
  This class wraps a :class:`torch.utils.data.Dataset` via the `dataset` attribute
  and configures the dataloaders needed to access the datasets. By default,
  this class will use `DEFAULT_NUM_WORKERS` processes to load the data
  (num_workers in :class:`torch.utils.data.DataLoader`).
  Transforms which need to be applied to the data should be specified in this class.
  ClassyDataset can be instantiated from a configuration file as well.
class_docstr_tok: ["Class","representing","a","dataset","abstraction",".","This","class","wraps","a",":","class",":","`","torch.utils.data.Dataset","`","via","the","`","dataset","`","attribute","and","configures","the","dataloaders","needed","to","access","the","datasets",".","By","default",",","this","class","will","use","`","DEFAULT_NUM_WORKERS","`","processes","to","load","the","data","(","num_workers","in",":","class",":","`","torch.utils.data.DataLoader","`",")",".","Transforms","which","need","to","be","applied","to","the","data","should","be","specified","in","this","class",".","ClassyDataset","can","be","instantiated","from","a","configuration","file","as","well","."]
code: def __len__(self):
      if self.dataset is None:
          assert self.num_samples
          return self.num_samples
      assert self.num_samples is None or self.num_samples <= len(
          self.dataset
      ), "Num samples mus be less than length of base dataset"
      return (
          len(self.dataset)
          if self.num_samples is None
          else self.num_samples
      )
  
file_path: ClassyVision/classy_vision/dataset/classy_dataset.py
imports: from typing import Any, Callable, Dict, Optional, Sequence, Union
  from classy_vision.dataset.transforms import ClassyTransform
  from classy_vision.generic.distributed_util import get_rank, get_world_size
  from classy_vision.generic.util import is_pos_int, log_class_usage
  from torch.utils.data import DataLoader
  from torch.utils.data.distributed import DistributedSampler
label_desc: Use image node_id 6 for calling the ClassyDataset obj's underlying member method code with example usage: obj.__len__() and returns: unknown, self