class_docstr: This class extends the basic Pytorch Dataset class to handle list of paths
  as the main data source.
docstr: Creates a File Dataset from a list of files and labels.
  
  :param root: root path where the data to load are stored. May be None.
  :param files: list of tuples. Each tuple must contain two elements: the
      full path to the pattern and its class label. Optionally, the tuple
      may contain a third element describing the bounding box to use for
      cropping (top, left, height, width).
  :param transform: eventual transformation to add to the input data (x)
  :param target_transform: eventual transformation to add to the targets
      (y)
  :param loader: loader function to use (for the real data) given path.
docstr_tok: ["Creates","a","File","Dataset","from","a","list","of","files","and","labels",".",":","param","root",":","root","path","where","the","data","to","load","are","stored",".","May","be","None",".",":","param","files",":","list","of","tuples",".","Each","tuple","must","contain","two","elements",":","the","full","path","to","the","pattern","and","its","class","label",".","Optionally",",","the","tuple","may","contain","a","third","element","describing","the","bounding","box","to","use","for","cropping","(","top",",","left",",","height",",","width",")",".",":","param","transform",":","eventual","transformation","to","add","to","the","input","data","(","x",")",":","param","target_transform",":","eventual","transformation","to","add","to","the","targets","(","y",")",":","param","loader",":","loader","function","to","use","(","for","the","real","data",")","given","path","."]
code: def __init__(
      self,
      root: Optional[PathALikeT],
      files: Sequence[FilesDefT[TTargetsType]],
      transform: XTransform = None,
      target_transform: YTransform = None,
      loader: Callable[[str], T] = default_image_loader,
  ):
      """
      Creates a File Dataset from a list of files and labels.
  
      :param root: root path where the data to load are stored. May be None.
      :param files: list of tuples. Each tuple must contain two elements: the
          full path to the pattern and its class label. Optionally, the tuple
          may contain a third element describing the bounding box to use for
          cropping (top, left, height, width).
      :param transform: eventual transformation to add to the input data (x)
      :param target_transform: eventual transformation to add to the targets
          (y)
      :param loader: loader function to use (for the real data) given path.
      """
  
      self.root: Optional[Path] = (
          Path(root) if root is not None else None
      )
      self.imgs = files
      self.targets = [img_data[1] for img_data in self.imgs]
      self.transform = transform
      self.target_transform = target_transform
      self.loader = loader
  
imports: from pathlib import Path
  from typing import Callable, Generic, List, Tuple, Sequence, Optional, TypeVar, Union
  import torch.utils.data
  from PIL import Image
  import os
  import os.path
  from torch import Tensor
  from torchvision.transforms.functional import crop
  from .transform_groups import XTransform, YTransform
label_desc: Use image node_id 1 to create a new PathsDataset object from inherited base classes: data.Dataset, Generic with example: obj = PathsDataset(root, files, transform, target_transform, loader)