code: def get_filelist_labels_images_paths(input_path):
      dataset_split_summary = {}
      img_paths, img_labels = [], []
      label_paths = g_pathmgr.ls(input_path)
      dataset_split_summary["labels"] = label_paths
      dataset_split_summary["num_labels"] = len(label_paths)
      print(f"{len(label_paths)} classes found.")
  
      total_split_examples = 0
      # Populate the img_paths and img_labels based on torchvision image folder file structure.
      for label in label_paths:
          label_path = os.path.join(input_path, label)
          images = g_pathmgr.ls(os.path.join(input_path, label))
          print(f"{len(images)} examples found for {label}.")
          total_split_examples += len(images)
          for image in images:
              img_path = os.path.join(label_path, image)
              img_paths.append(img_path)
              img_labels.append(label)
  
      # print the dataset summary
      dataset_split_summary["num_examples"] = total_split_examples
      print(f"{total_split_examples} found")
      return dataset_split_summary, img_paths, img_labels
  
file_path: vissl/extra_scripts/convert_folder_to_filelist.py
imports: import argparse
  import os
  from iopath.common.file_io import g_pathmgr
  from vissl.utils.env import setup_path_manager
  from vissl.utils.io import save_file
label_desc: Use image node_id 1 for calling a global function with example usage: get_filelist_labels_images_paths(input_path) and returns: dataset_split_summary,  img_paths,  img_labels