code: def dump_frames(vid_item):
      from gluoncv.utils.filesystem import try_import_mmcv
  
      mmcv = try_import_mmcv()
  
      full_path, vid_path, vid_id = vid_item
      vid_name = vid_path.split(".")[0]
      out_full_path = osp.join(args.out_dir, vid_name)
      try:
          os.mkdir(out_full_path)
      except OSError:
          pass
      vr = mmcv.VideoReader(full_path)
      for i in range(len(vr)):
          if vr[i] is not None:
              if args.new_width > 0 and args.new_height > 0:
                  cur_img = mmcv.imresize(
                      vr[i], (args.new_width, args.new_height)
                  )
              else:
                  cur_img = vr[i]
              mmcv.imwrite(
                  cur_img,
                  "{}/img_{:05d}.jpg".format(out_full_path, i + 1),
              )
          else:
              print(
                  "[Warning] length inconsistent!"
                  "Early stop with {} out of {} frames".format(
                      i + 1, len(vr)
                  )
              )
              break
      print("{} done with {} frames".format(vid_name, len(vr)))
      sys.stdout.flush()
      return True
  
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 1 for calling a global function with example usage: dump_frames(vid_item) and returns: True