code: def get_filelist_labels_images_paths(input_path):
      dataset_summary, metadata = {}, {}
      img_paths, gender_labels, race_labels, age_labels = [], [], [], []
      inp_image_names = PathManager.ls(input_path)
      print(f"{len(inp_image_names)} images found.")
  
      total_examples = 0
      # Populate the img_paths and labels labels based on folder file structure.
      for img_name in inp_image_names:
          if not img_name.endswith(".jpg"):
              continue
          img_path = os.path.join(input_path, img_name)
          img_paths.append(img_path)
  
          img_age = int(str(img_name).split("_")[0])
          img_gender = GENDER_MAPPING[int(str(img_name).split("_")[1])]
          img_race = RACE_MAPPING[int(str(img_name).split("_")[2])]
          # import pdb; pdb.set_trace()
          age_labels.append(img_age)
          gender_labels.append(img_gender)
          race_labels.append(img_race)
          metadata[img_name] = {
              "age": img_age,
              "gender": img_gender,
              "race": img_race,
          }
          total_examples += 1
  
      # print the dataset summary
      print(f"Dataset has {total_examples} images")
      dataset_summary["num_images"] = total_examples
      return (
          dataset_summary,
          metadata,
          img_paths,
          age_labels,
          gender_labels,
          race_labels,
      )
  
file_path: vissl/extra_scripts/datasets/create_utk_faces_filelist.py
imports: import argparse
  import os
  from fvcore.common.file_io import PathManager
  from vissl.utils.env import setup_path_manager
  from vissl.utils.io import save_file
label_desc: Use image node_id 2 for calling a global function with example usage: get_filelist_labels_images_paths(input_path) and returns: dataset_summary,  metadata,  img_paths,  age_labels,  gender_labels,  race_labels