code: def parse_args():
      parser = argparse.ArgumentParser(
          description="Test (and eval) a model"
      )
      parser.add_argument("config", help="Test config file path")
      parser.add_argument("checkpoint", help="Checkpoint file")
      parser.add_argument(
          "--work-dir",
          help="The directory to save the file containing evaluation metrics",
      )
      parser.add_argument(
          "--save-preds",
          action="store_true",
          help="Dump predictions to a pickle file for offline evaluation",
      )
      parser.add_argument(
          "--show", action="store_true", help="Show prediction results"
      )
      parser.add_argument(
          "--show-dir",
          help="Directory where painted images will be saved. "
          "If specified, it will be automatically saved "
          "to the work_dir/timestamp/show_dir",
      )
      parser.add_argument(
          "--wait-time",
          type=float,
          default=2,
          help="The interval of show (s)",
      )
      parser.add_argument(
          "--cfg-options",
          nargs="+",
          action=DictAction,
          help="Override some settings in the used config, the key-value pair "
          "in xxx=yyy format will be merged into config file. If the value to "
          'be overwritten is a list, it should be like key="[a,b]" or key=a,b '
          'It also allows nested list/tuple values, e.g. key="[(a,b),(c,d)]" '
          "Note that the quotation marks are necessary and that no white space "
          "is allowed.",
      )
      parser.add_argument(
          "--launcher",
          choices=["none", "pytorch", "slurm", "mpi"],
          default="none",
          help="Job launcher",
      )
      parser.add_argument(
          "--tta", action="store_true", help="Test time augmentation"
      )
      # When using PyTorch version >= 2.0.0, the `torch.distributed.launch`
      # will pass the `--local-rank` parameter to `tools/test.py` instead
      # of `--local_rank`.
      parser.add_argument(
          "--local_rank", "--local-rank", type=int, default=0
      )
      args = parser.parse_args()
      if "LOCAL_RANK" not in os.environ:
          os.environ["LOCAL_RANK"] = str(args.local_rank)
      return args
  
file_path: mmocr/tools/test.py
imports: import argparse
  import os
  import os.path
  from mmengine.config import Config, DictAction
  from mmengine.registry import RUNNERS
  from mmengine.runner import Runner
label_desc: Use image node_id 1 for calling a global function with example usage: parse_args() and returns: args