code: def load_image_lists(cfg, is_train):
      """
      Loading image paths from corresponding files.
  
      Args:
          cfg (CfgNode): config.
          is_train (bool): if it is training dataset or not.
  
      Returns:
          image_paths (list[list]): a list of items. Each item (also a list)
              corresponds to one video and contains the paths of images for
              this video.
          video_idx_to_name (list): a list which stores video names.
      """
      list_filenames = [
          os.path.join(cfg.AVA.FRAME_LIST_DIR, filename)
          for filename in (
              cfg.AVA.TRAIN_LISTS if is_train else cfg.AVA.TEST_LISTS
          )
      ]
      image_paths = defaultdict(list)
      video_name_to_idx = {}
      video_idx_to_name = []
      for list_filename in list_filenames:
          with pathmgr.open(list_filename, "r") as f:
              f.readline()
              for line in f:
                  row = line.split()
                  # The format of each row should follow:
                  # original_vido_id video_id frame_id path labels.
                  assert len(row) == 5
                  video_name = row[0]
  
                  if video_name not in video_name_to_idx:
                      idx = len(video_name_to_idx)
                      video_name_to_idx[video_name] = idx
                      video_idx_to_name.append(video_name)
  
                  data_key = video_name_to_idx[video_name]
  
                  image_paths[data_key].append(
                      os.path.join(cfg.AVA.FRAME_DIR, row[3])
                  )
  
      image_paths = [image_paths[i] for i in range(len(image_paths))]
  
      logger.info(
          "Finished loading image paths from: %s"
          % ", ".join(list_filenames)
      )
  
      return image_paths, video_idx_to_name
  
file_path: SlowFast/slowfast/datasets/ava_helper.py
imports: import logging
  import os
  from collections import defaultdict
  from slowfast.utils.env import pathmgr
label_desc: Use image node_id 1 for calling a global function with example usage: load_image_lists(cfg, is_train) and returns: image_paths,  video_idx_to_name