code: def parse_args():
      parser = argparse.ArgumentParser(
          description="Preparing datasets used in MMOCR."
      )
      parser.add_argument(
          "datasets",
          help="A list of the dataset names that would like to prepare.",
          nargs="+",
      )
      parser.add_argument(
          "--nproc",
          help="Number of processes to run",
          default=4,
          type=int,
      )
      parser.add_argument(
          "--task",
          default="textdet",
          choices=["textdet", "textrecog", "textspotting", "kie"],
          help='Task type. Options are "textdet", "textrecog", "textspotting"'
          ' and "kie".',
      )
      parser.add_argument(
          "--splits",
          default=["train", "test", "val"],
          help="A list of the split that would like to prepare.",
          nargs="+",
      )
      parser.add_argument(
          "--lmdb",
          action="store_true",
          default=False,
          help="Whether to dump the textrecog dataset to LMDB format, It's a "
          "shortcut to force the dataset to be dumped in lmdb format. "
          "Applicable when --task=textrecog",
      )
      parser.add_argument(
          "--overwrite-cfg",
          action="store_true",
          default=False,
          help="Whether to overwrite the dataset config file if it already"
          " exists. If not specified, Dataset Preparer will not generate"
          " new config for datasets whose configs are already in base.",
      )
      parser.add_argument(
          "--dataset-zoo-path",
          default="./dataset_zoo",
          help="Path to dataset zoo config files.",
      )
      args = parser.parse_args()
      return args
  
file_path: mmocr/tools/dataset_converters/prepare_dataset.py
imports: import argparse
  import os.path
  import time
  import warnings
  from mmengine import Config
  from mmocr.datasets.preparers import DatasetPreparer
label_desc: Use image node_id 1 for calling a global function with example usage: parse_args() and returns: args