code: def load_image_lists(frame_list_file, prefix="", return_list=False):
      """
      Load image paths and labels from a "frame list".
      Each line of the frame list contains:
      `original_vido_id video_id frame_id path labels`
      Args:
          frame_list_file (string): path to the frame list.
          prefix (str): the prefix for the path.
          return_list (bool): if True, return a list. If False, return a dict.
      Returns:
          image_paths (list or dict): list of list containing path to each frame.
              If return_list is False, then return in a dict form.
          labels (list or dict): list of list containing label of each frame.
              If return_list is False, then return in a dict form.
      """
      image_paths = defaultdict(list)
      labels = defaultdict(list)
      with pathmgr.open(frame_list_file, "r") as f:
          assert f.readline().startswith("original_vido_id")
          for line in f:
              row = line.split()
              # original_vido_id video_id frame_id path labels
              assert len(row) == 5
              video_name = row[0]
              if prefix == "":
                  path = row[3]
              else:
                  path = os.path.join(prefix, row[3])
              image_paths[video_name].append(path)
              frame_labels = row[-1].replace('"', "")
              if frame_labels != "":
                  labels[video_name].append(
                      [int(x) for x in frame_labels.split(",")]
                  )
              else:
                  labels[video_name].append([])
  
      if return_list:
          keys = image_paths.keys()
          image_paths = [image_paths[key] for key in keys]
          labels = [labels[key] for key in keys]
          return image_paths, labels
      return dict(image_paths), dict(labels)
  
imports: import logging
  import numpy
  import os
  import random
  import time
  from collections import defaultdict
  import cv2
  import torch
  from torch.utils.data.distributed import DistributedSampler
  from torchvision import transforms
  from slowfast.utils.env import pathmgr
  from .None import transform
  from .random_erasing import RandomErasing
  from .transform import create_random_augment
label_desc: Use image node_id 8 for calling a global function with example usage: load_image_lists(frame_list_file, prefix, return_list) and returns: dict,  dict, image_paths,  labels