class_docstr: Tiny Imagenet Pytorch Dataset
docstr: Returns dictionaries to convert class names into progressive ids
  and viceversa.
  
  :param data_folder: The root path of tiny imagenet
  :returns: label2id, id2label: two Python dictionaries.
docstr_tok: ["Returns","dictionaries","to","convert","class","names","into","progressive","ids","and","viceversa",".",":","param","data_folder",":","The","root","path","of","tiny","imagenet",":","returns",":","label2id",",","id2label",":","two","Python","dictionaries","."]
code: def labels2dict(data_folder: Path):
      """
      Returns dictionaries to convert class names into progressive ids
      and viceversa.
  
      :param data_folder: The root path of tiny imagenet
      :returns: label2id, id2label: two Python dictionaries.
      """
  
      label2id = {}
      id2label = {}
  
      with open(str(data_folder / "wnids.txt"), "r") as f:
          reader = csv.reader(f)
          curr_idx = 0
          for ll in reader:
              if ll[0] not in label2id:
                  label2id[ll[0]] = curr_idx
                  id2label[curr_idx] = ll[0]
                  curr_idx += 1
  
      return label2id, id2label
  
file_path: avalanche/avalanche/benchmarks/datasets/tiny_imagenet/tiny_imagenet.py
imports: import csv
  from pathlib import Path
  from typing import List, Optional, Tuple, Union
  from torchvision.datasets.folder import default_loader
  from torchvision.transforms import ToTensor
  from avalanche.benchmarks.datasets import SimpleDownloadableDataset, default_dataset_location
label_desc: Use image node_id 3 for calling the TinyImagenet obj's underlying member method code with example usage: obj.labels2dict(data_folder) and returns: label2id,  id2label