class_docstr: The MiniImageNet dataset.
  
  This implementation is based on the one from
  https://github.com/yaoyao-liu/mini-imagenet-tools. Differently from that,
  this class doesn't rely on a pre-generated mini imagenet folder. Instead,
  this will use the original ImageNet folder by resizing images on-the-fly.
  
  The list of included files are the ones defined in the CSVs taken from the
  aforementioned repository. Those CSVs are generated by Ravi and Larochelle.
  See the linked repository for more details.
  
  Exactly as happens with the torchvision :class:`ImageNet` class, textual
  class labels (wnids) such as "n02119789", "n02102040", etc. are mapped to
  numerical labels based on their ascending order.
  
  All the fields found in the torchvision implementation of the ImageNet
  dataset (`wnids`, `wnid_to_idx`, `classes`, `class_to_idx`) are available.
class_docstr_tok: ["The","MiniImageNet","dataset",".","This","implementation","is","based","on","the","one","from","https",":","\/\/github.com\/yaoyao-liu\/mini-imagenet-tools",".","Differently","from","that",",","this","class","does","n't","rely","on","a","pre-generated","mini","imagenet","folder",".","Instead",",","this","will","use","the","original","ImageNet","folder","by","resizing","images","on-the-fly",".","The","list","of","included","files","are","the","ones","defined","in","the","CSVs","taken","from","the","aforementioned","repository",".","Those","CSVs","are","generated","by","Ravi","and","Larochelle",".","See","the","linked","repository","for","more","details",".","Exactly","as","happens","with","the","torchvision",":","class",":","`","ImageNet","`","class",",","textual","class","labels","(","wnids",")","such","as","``","n02119789","''",",","``","n02102040","''",",","etc",".","are","mapped","to","numerical","labels","based","on","their","ascending","order",".","All","the","fields","found","in","the","torchvision","implementation","of","the","ImageNet","dataset","(","`","wnids","`",",","`","wnid_to_idx","`",",","`","classes","`",",","`","class_to_idx","`",")","are","available","."]
code: def get_train_path(root_path: Union[str, Path]):
      root_path = Path(root_path)
      if (root_path / "train").exists():
          return root_path / "train"
      return root_path
  
file_path: avalanche/avalanche/benchmarks/datasets/mini_imagenet/mini_imagenet.py
imports: import csv
  import glob
  from pathlib import Path
  from typing import Union, List, Tuple, Dict
  from torchvision.datasets.folder import default_loader
  from typing_extensions import Literal
  import PIL
  import numpy
  from PIL import Image
  from torch.utils.data.dataset import Dataset
  from torchvision.transforms import Resize
  from avalanche.benchmarks.datasets.mini_imagenet.mini_imagenet_data import MINI_IMAGENET_WNIDS, MINI_IMAGENET_WNID_TO_IDX, MINI_IMAGENET_CLASSES, MINI_IMAGENET_CLASS_TO_IDX
label_desc: Use image node_id 2 for calling the MiniImageNetDataset obj's underlying member method code with example usage: obj.get_train_path(root_path) and returns: root_path, unknown