code: def build_split_list(split, frame_info, shuffle=False):
      def build_set_list(set_list):
          rgb_list, flow_list = list(), list()
          for item in set_list:
              if item[0] not in frame_info:
                  # print("item:", item)
                  continue
              elif frame_info[item[0]][1] > 0:
                  rgb_cnt = frame_info[item[0]][1]
                  flow_cnt = frame_info[item[0]][2]
                  rgb_list.append(
                      "{} {} {}\n".format(item[0], rgb_cnt, item[1])
                  )
                  flow_list.append(
                      "{} {} {}\n".format(item[0], flow_cnt, item[1])
                  )
              else:
                  rgb_list.append("{} {}\n".format(item[0], item[1]))
                  flow_list.append("{} {}\n".format(item[0], item[1]))
          if shuffle:
              random.shuffle(rgb_list)
              random.shuffle(flow_list)
          return rgb_list, flow_list
  
      train_rgb_list, train_flow_list = build_set_list(split[0])
      test_rgb_list, test_flow_list = build_set_list(split[1])
      return (train_rgb_list, test_rgb_list), (
          train_flow_list,
          test_flow_list,
      )
  
imports: import argparse
  import sys
  import os
  import os.path
  import glob
  import fnmatch
  import random
  import zipfile
  from pipes import quote
  from multiprocessing import Pool, current_process
  import csv
label_desc: Use image node_id 9 for calling a global function with example usage: build_split_list(split, frame_info, shuffle) and returns: train_rgb_list,  test_rgb_list,  train_flow_list,  test_flow_list, rgb_list,  flow_list