code: def parse_args():
      parser = argparse.ArgumentParser(
          description="Create GIF for demo"
      )
      parser.add_argument(
          "image_dir",
          help="directory where result "
          "images save path generated by ‘analyze_results.py’",
      )
      parser.add_argument(
          "--out",
          type=str,
          default="result.gif",
          help="gif path where will be saved",
      )
      args = parser.parse_args()
      return args
  
file_path: mmdetection/demo/create_result_gif.py
imports: import argparse
  import os
  import os.path
  import matplotlib.patches
  import matplotlib.pyplot
  import mmcv
  import numpy
  from mmengine.utils import scandir
label_desc: Use image node_id 1 for calling a global function with example usage: parse_args() and returns: args