class_docstr: Implements a dataset folder.
  
  DatasetFolder based on torchvisions implementation.
  (https://pytorch.org/docs/stable/torchvision/datasets.html#datasetfolder)
  
  Attributes:
      root:
          Root directory path
      loader:
          Function that loads file at path
      extensions:
          Tuple of allowed extensions
      transform:
          Function that takes a PIL image and returns transformed version
      target_transform:
          As transform but for targets
      is_valid_file:
          Used to check corrupt files
  
  Raises:
      RuntimeError: If no supported files are found in root.
docstr: Returns item at index.
  
  Args:
      index:
          Index of the sample to retrieve.
  
  Returns:
      A tuple (sample, target) where target is 0.
docstr_tok: ["Returns","item","at","index",".","Args",":","index",":","Index","of","the","sample","to","retrieve",".","Returns",":","A","tuple","(","sample",",","target",")","where","target","is","0","."]
code: def __getitem__(self, index: int):
      """Returns item at index.
  
      Args:
          index:
              Index of the sample to retrieve.
  
      Returns:
          A tuple (sample, target) where target is 0.
  
      """
  
      path, target = self.samples[index]
      sample = self.loader(path)
      if self.transform is not None:
          sample = self.transform(sample)
      if self.target_transform is not None:
          target = self.target_transform(target)
  
      return sample, target
  
file_path: lightly/lightly/data/_image.py
imports: import os
  from typing import List, Set, Tuple
  import torchvision.datasets
  from torchvision import transforms
  from lightly.data._image_loaders import default_loader
label_desc: Use image node_id 2 for calling the DatasetFolder obj's underlying member method code with example usage: obj.__getitem__(index) and returns: sample,  target