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 __getitem__(self, idx: int):
      assert idx >= 0 and idx < len(
          self.dataset
      ), "Provided idx ({}) is outside of dataset range".format(idx)
      sample = self.dataset[idx]
      if self.transform is None:
          return sample
      return self.transform(sample)
  
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 5 for calling the ClassyDataset obj's underlying member method code with example usage: obj.__getitem__(idx) and returns: self, sample