class_docstr: CORe50 Pytorch Dataset
class_docstr_tok: ["CORe50","Pytorch","Dataset"]
docstr: Args:
      index (int): Index
  
  Returns:
      tuple: (sample, target) where target is class_index of the target
          class.
docstr_tok: ["Args",":","index","(","int",")",":","Index","Returns",":","tuple",":","(","sample",",","target",")","where","target","is","class_index","of","the","target","class","."]
code: def __getitem__(self, index):
      """
      Args:
          index (int): Index
  
      Returns:
          tuple: (sample, target) where target is class_index of the target
              class.
      """
  
      target = self.targets[index]
      if self.mini:
          bp = "core50_32x32"
      else:
          bp = "core50_128x128"
  
      img = self.loader(str(self.root / bp / self.paths[index]))
      if self.transform is not None:
          img = self.transform(img)
      if self.target_transform is not None:
          target = self.target_transform(target)
  
      return img, target
  
imports: import glob
  import os
  import pickle
  from pathlib import Path
  from typing import List, Optional, Tuple, Union
  from warnings import warn
  from torchvision.datasets.folder import default_loader
  from torchvision.transforms import ToTensor
  from avalanche.benchmarks.datasets.core50 import core50_data
  from avalanche.benchmarks.datasets import default_dataset_location
  from avalanche.benchmarks.datasets.downloadable_dataset import DownloadableDataset
label_desc: Use image node_id 2 for calling the CORe50Dataset obj's underlying member method code with example usage: obj.__getitem__(index) and returns: img,  target