class_docstr: CORe50 Pytorch Dataset
class_docstr_tok: ["CORe50","Pytorch","Dataset"]
docstr: Generates corresponding filelists with category-wise labels. The
  default one are based on the object-level labels from 0 to 49.
docstr_tok: ["Generates","corresponding","filelists","with","category-wise","labels",".","The","default","one","are","based","on","the","object-level","labels","from","0","to","49","."]
code: def _create_cat_filelists(self):
      """Generates corresponding filelists with category-wise labels. The
      default one are based on the object-level labels from 0 to 49."""
  
      for k, v in core50_data.scen2dirs.items():
          orig_root_path = os.path.join(self.root, v)
          root_path = os.path.join(self.root, v[:-1] + "_cat")
          if not os.path.exists(root_path):
              os.makedirs(root_path)
          for run in range(10):
              cur_path = os.path.join(root_path, "run" + str(run))
              orig_cur_path = os.path.join(
                  orig_root_path, "run" + str(run)
              )
              if not os.path.exists(cur_path):
                  os.makedirs(cur_path)
              for file in glob.glob(
                  os.path.join(orig_cur_path, "*.txt")
              ):
                  o_filename = file
                  _, d_filename = os.path.split(o_filename)
                  orig_f = open(o_filename, "r")
                  dst_f = open(os.path.join(cur_path, d_filename), "w")
                  for line in orig_f:
                      path, label = line.split(" ")
                      new_label = self._objlab2cat(int(label), k, run)
                      dst_f.write(path + " " + str(new_label) + "\n")
                  orig_f.close()
                  dst_f.close()
  
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 7 for calling the CORe50Dataset obj's underlying member method code with example usage: obj._create_cat_filelists() without return types