code: def parse_args():
      parser = argparse.ArgumentParser(
          description="Convert images to coco format without annotations"
      )
      parser.add_argument("img_path", help="The root path of images")
      parser.add_argument(
          "classes",
          type=str,
          help="The text file name of storage class list",
      )
      parser.add_argument(
          "out",
          type=str,
          help="The output annotation json file name, The save dir is in the "
          "same directory as img_path",
      )
      parser.add_argument(
          "-e",
          "--exclude-extensions",
          type=str,
          nargs="+",
          help='The suffix of images to be excluded, such as "png" and "bmp"',
      )
      args = parser.parse_args()
      return args
  
file_path: mmdetection/tools/dataset_converters/images2coco.py
imports: import argparse
  import os
  from mmengine.fileio import dump, list_from_file
  from mmengine.utils import mkdir_or_exist, scandir, track_iter_progress
  from PIL import Image
label_desc: Use image node_id 1 for calling a global function with example usage: parse_args() and returns: args