code: def get_all_classes(data_dir):
      class_idx = {}
      counter = 0
      for item in os.listdir(data_dir):
          if item not in ["." ".."]:
              class_idx[item] = counter
              counter += 1
      return class_idx
  
file_path: vissl/extra_scripts/datasets/create_imagenet_data_files.py
imports: import argparse
  import logging
  import os
  import sys
  import numpy
  from iopath.common.file_io import g_pathmgr
label_desc: Use image node_id 1 for calling a global function with example usage: get_all_classes(data_dir) and returns: class_idx