code: def parse_ucf101_splits(args):
      level = args.level
      class_ind = [
          x.strip().split()
          for x in open(os.path.join(args.anno_dir, "classInd.txt"))
      ]
      class_mapping = {x[1]: int(x[0]) - 1 for x in class_ind}
  
      def line2rec(line):
          items = line.strip().split(" ")
          vid = items[0].split(".")[0]
          vid = "/".join(vid.split("/")[-level:])
          label = class_mapping[items[0].split("/")[0]]
          return vid, label
  
      splits = []
      for i in range(1, 4):
          train_list = [
              line2rec(x)
              for x in open(
                  os.path.join(
                      args.anno_dir, "trainlist{:02d}.txt".format(i)
                  )
              )
          ]
          test_list = [
              line2rec(x)
              for x in open(
                  os.path.join(
                      args.anno_dir, "testlist{:02d}.txt".format(i)
                  )
              )
          ]
          splits.append((train_list, test_list))
      return splits
  
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 6 for calling a global function with example usage: parse_ucf101_splits(args) and returns: splits, vid,  label