code: def parse_args():
      parser = argparse.ArgumentParser(
          description="MMDet test detector"
      )
      parser.add_argument("config", help="test config file path")
      parser.add_argument("checkpoint", help="checkpoint file")
      parser.add_argument(
          "--out",
          type=str,
          help="dump predictions to a pickle file for offline evaluation",
      )
      parser.add_argument(
          "--corruptions",
          type=str,
          nargs="+",
          default="benchmark",
          choices=[
              "all",
              "benchmark",
              "noise",
              "blur",
              "weather",
              "digital",
              "holdout",
              "None",
              "gaussian_noise",
              "shot_noise",
              "impulse_noise",
              "defocus_blur",
              "glass_blur",
              "motion_blur",
              "zoom_blur",
              "snow",
              "frost",
              "fog",
              "brightness",
              "contrast",
              "elastic_transform",
              "pixelate",
              "jpeg_compression",
              "speckle_noise",
              "gaussian_blur",
              "spatter",
              "saturate",
          ],
          help="corruptions",
      )
      parser.add_argument(
          "--work-dir",
          help="the directory to save the file containing evaluation metrics",
      )
      parser.add_argument(
          "--severities",
          type=int,
          nargs="+",
          default=[0, 1, 2, 3, 4, 5],
          help="corruption severity levels",
      )
      parser.add_argument(
          "--summaries",
          type=bool,
          default=False,
          help="Print summaries for every corruption and severity",
      )
      parser.add_argument(
          "--show", action="store_true", help="show results"
      )
      parser.add_argument(
          "--show-dir",
          help="directory where painted images will be saved",
      )
      parser.add_argument(
          "--wait-time",
          type=float,
          default=2,
          help="the interval of show (s)",
      )
      parser.add_argument(
          "--seed", type=int, default=None, help="random seed"
      )
      parser.add_argument(
          "--launcher",
          choices=["none", "pytorch", "slurm", "mpi"],
          default="none",
          help="job launcher",
      )
      parser.add_argument("--local_rank", type=int, default=0)
      parser.add_argument(
          "--final-prints",
          type=str,
          nargs="+",
          choices=["P", "mPC", "rPC"],
          default="mPC",
          help="corruption benchmark metric to print at the end",
      )
      parser.add_argument(
          "--final-prints-aggregate",
          type=str,
          choices=["all", "benchmark"],
          default="benchmark",
          help="aggregate all results or only those for benchmark corruptions",
      )
      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.",
      )
      args = parser.parse_args()
      if "LOCAL_RANK" not in os.environ:
          os.environ["LOCAL_RANK"] = str(args.local_rank)
      return args
  
file_path: mmdetection/tools/analysis_tools/test_robustness.py
imports: import argparse
  import copy
  import os
  import os.path
  from mmengine.config import Config, DictAction
  from mmengine.dist import get_dist_info
  from mmengine.evaluator import DumpResults
  from mmengine.fileio import dump
  from mmengine.runner import Runner
  from mmdet.engine.hooks.utils import trigger_visualization_hook
  from mmdet.registry import RUNNERS
  from tools.analysis_tools.robustness_eval import get_results
label_desc: Use image node_id 1 for calling a global function with example usage: parse_args() and returns: args