code: def parse_args():
      parser = argparse.ArgumentParser(
          description="Generate confusion matrix from detection results"
      )
      parser.add_argument("config", help="test config file path")
      parser.add_argument(
          "prediction_path",
          help="prediction path where test .pkl result",
      )
      parser.add_argument(
          "save_dir",
          help="directory where confusion matrix will be saved",
      )
      parser.add_argument(
          "--show", action="store_true", help="show confusion matrix"
      )
      parser.add_argument(
          "--color-theme",
          default="plasma",
          help="theme of the matrix color map",
      )
      parser.add_argument(
          "--score-thr",
          type=float,
          default=0.3,
          help="score threshold to filter detection bboxes",
      )
      parser.add_argument(
          "--tp-iou-thr",
          type=float,
          default=0.5,
          help="IoU threshold to be considered as matched",
      )
      parser.add_argument(
          "--nms-iou-thr",
          type=float,
          default=None,
          help="nms IoU threshold, only applied when users want to change the"
          "nms IoU threshold.",
      )
      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()
      return args
  
file_path: mmdetection/tools/analysis_tools/confusion_matrix.py
imports: import argparse
  import os
  import matplotlib.pyplot
  import numpy
  from matplotlib.ticker import MultipleLocator
  from mmcv.ops import nms
  from mmengine import Config, DictAction
  from mmengine.fileio import load
  from mmengine.registry import init_default_scope
  from mmengine.utils import ProgressBar
  from mmdet.evaluation import bbox_overlaps
  from mmdet.registry import DATASETS
  from mmdet.utils import replace_cfg_vals, update_data_root
label_desc: Use image node_id 1 for calling a global function with example usage: parse_args() and returns: args