class_docstr: Basic CUB200 PathsDataset to be used as a standard PyTorch Dataset.
  A classic continual learning benchmark built on top of this dataset
  can be found in 'benchmarks.classic', while for more custom benchmark
  design please use the 'benchmarks.generators'.
docstr: Main method to load the CUB200 metadata
docstr_tok: ["Main","method","to","load","the","CUB200","metadata"]
code: def _load_metadata(self):
      """Main method to load the CUB200 metadata"""
  
      cub_dir = self.root / "CUB_200_2011"
      images_list: Dict[int, List] = OrderedDict()
  
      with open(str(cub_dir / "train_test_split.txt")) as csv_file:
          csv_reader = csv.reader(csv_file, delimiter=" ")
          for row in csv_reader:
              img_id = int(row[0])
              is_train_instance = int(row[1]) == 1
              if is_train_instance == self.train:
                  images_list[img_id] = []
  
      with open(str(cub_dir / "images.txt")) as csv_file:
          csv_reader = csv.reader(csv_file, delimiter=" ")
          for row in csv_reader:
              img_id = int(row[0])
              if img_id in images_list:
                  images_list[img_id].append(row[1])
  
      with open(str(cub_dir / "image_class_labels.txt")) as csv_file:
          csv_reader = csv.reader(csv_file, delimiter=" ")
          for row in csv_reader:
              img_id = int(row[0])
              if img_id in images_list:
                  # CUB starts counting classes from 1 ...
                  images_list[img_id].append(int(row[1]) - 1)
  
      with open(str(cub_dir / "bounding_boxes.txt")) as csv_file:
          csv_reader = csv.reader(csv_file, delimiter=" ")
          for row in csv_reader:
              img_id = int(row[0])
              if img_id in images_list:
                  box_cub = [int(float(x)) for x in row[1:]]
                  box_avl = [
                      box_cub[1],
                      box_cub[0],
                      box_cub[3],
                      box_cub[2],
                  ]
                  # PathsDataset accepts (top, left, height, width)
                  images_list[img_id].append(box_avl)
  
      images_tuples = []
      for _, img_tuple in images_list.items():
          images_tuples.append(tuple(img_tuple))
      self._images = images_tuples  # type: ignore
  
      # Integrity check
      for row_check in self._images:
          filepath = self.root / CUB200.images_folder / row_check[0]
          if not filepath.is_file():
              if self.verbose:
                  print(
                      "[CUB200] Error checking integrity of:", filepath
                  )
              return False
  
      return True
  
file_path: avalanche/avalanche/benchmarks/datasets/cub200/cub200.py
imports: import csv
  from pathlib import Path
  from typing import Dict, List, Optional, Tuple, Union
  import gdown
  import os
  from collections import OrderedDict
  from torchvision.datasets.folder import default_loader
  from avalanche.benchmarks.datasets import default_dataset_location, DownloadableDataset
  from avalanche.benchmarks.utils import PathsDataset
label_desc: Use image node_id 4 for calling the CUB200 obj's underlying member method code with example usage: obj._load_metadata() and returns: True, False