code: def parse_args():
      parser = argparse.ArgumentParser(
          description="prepare Kinetics400 dataset"
      )
      parser.add_argument(
          "--download_dir",
          type=str,
          default="~/.mxnet/datasets/kinetics400",
      )
      parser.add_argument(
          "--src_dir",
          type=str,
          default="~/.mxnet/datasets/kinetics400/train",
      )
      parser.add_argument(
          "--out_dir",
          type=str,
          default="~/.mxnet/datasets/kinetics400/rawframes_train",
      )
      parser.add_argument(
          "--frame_path",
          type=str,
          default="~/.mxnet/datasets/kinetics400/rawframes_train",
      )
      parser.add_argument(
          "--anno_dir",
          type=str,
          default="~/.mxnet/datasets/kinetics400/annotations",
      )
      parser.add_argument(
          "--out_list_path",
          type=str,
          default="~/.mxnet/datasets/kinetics400",
      )
      parser.add_argument(
          "--level", type=int, choices=[1, 2], default=2
      )
      parser.add_argument("--num_worker", type=int, default=8)
      parser.add_argument(
          "--flow_type",
          type=str,
          default=None,
          choices=[None, "tvl1", "warp_tvl1"],
      )
      parser.add_argument(
          "--df_path",
          type=str,
          default="./dense_flow",
          help="need dense flow implementation",
      )
      parser.add_argument(
          "--out_format",
          type=str,
          default="dir",
          choices=["dir", "zip"],
          help="output format",
      )
      parser.add_argument(
          "--ext",
          type=str,
          default="mp4",
          choices=["avi", "mp4"],
          help="video file extensions",
      )
      parser.add_argument(
          "--new_width", type=int, default=0, help="resize image width"
      )
      parser.add_argument(
          "--new_height",
          type=int,
          default=0,
          help="resize image height",
      )
      parser.add_argument(
          "--num_gpu", type=int, default=8, help="number of GPU"
      )
      parser.add_argument(
          "--resume",
          action="store_true",
          default=False,
          help="resume optical flow extraction instead of overwriting",
      )
      parser.add_argument(
          "--dataset",
          type=str,
          choices=["ucf101", "kinetics400"],
          default="kinetics400",
      )
      parser.add_argument("--rgb_prefix", type=str, default="img_")
      parser.add_argument(
          "--flow_x_prefix", type=str, default="flow_x_"
      )
      parser.add_argument(
          "--flow_y_prefix", type=str, default="flow_y_"
      )
      parser.add_argument("--num_split", type=int, default=1)
      parser.add_argument(
          "--subset",
          type=str,
          default="train",
          choices=["train", "val", "test"],
      )
      parser.add_argument(
          "--format",
          type=str,
          default="rawframes",
          choices=["rawframes", "videos"],
      )
      parser.add_argument(
          "--shuffle", action="store_true", default=False
      )
      parser.add_argument(
          "--tiny_dataset", action="store_true", default=False
      )
      parser.add_argument(
          "--download", action="store_true", default=False
      )
      parser.add_argument(
          "--decode_video", action="store_true", default=False
      )
      parser.add_argument(
          "--build_file_list", action="store_true", default=False
      )
      args = parser.parse_args()
  
      args.download_dir = os.path.expanduser(args.download_dir)
      args.src_dir = os.path.expanduser(args.src_dir)
      args.out_dir = os.path.expanduser(args.out_dir)
      args.frame_path = os.path.expanduser(args.frame_path)
      args.anno_dir = os.path.expanduser(args.anno_dir)
      args.out_list_path = os.path.expanduser(args.out_list_path)
  
      return args
  
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 4 for calling a global function with example usage: parse_args() and returns: args