code: def parse_args():
      parser = argparse.ArgumentParser(description="Browse a dataset")
      parser.add_argument(
          "config", help="Path to model or dataset config."
      )
      parser.add_argument(
          "--phase",
          "-p",
          default="train",
          type=str,
          help='Phase of dataset to visualize. Use "train", "test" or "val" if '
          "you just want to visualize the default split. It's also possible to "
          "be a dataset variable name, which might be useful when a dataset "
          "split has multiple variants in the config.",
      )
      parser.add_argument(
          "--mode",
          "-m",
          default="transformed",
          type=str,
          choices=["original", "transformed", "pipeline"],
          help="Display mode: display original pictures or "
          'transformed pictures or comparison pictures. "original" '
          "only visualizes the original dataset & annotations; "
          '"transformed" shows the resulting images processed through all the '
          'transforms; "pipeline" shows all the intermediate images. '
          'Defaults to "transformed".',
      )
      parser.add_argument(
          "--output-dir",
          "-o",
          default=None,
          type=str,
          help="If there is no display interface, you can save it.",
      )
      parser.add_argument(
          "--task",
          "-t",
          default="auto",
          choices=["auto", "textdet", "textrecog"],
          type=str,
          help='Specify the task type of the dataset. If "auto", the task type '
          "will be inferred from the config. If the script is unable to infer "
          'the task type, you need to specify it manually. Defaults to "auto".',
      )
      parser.add_argument(
          "--not-show", default=False, action="store_true"
      )
      parser.add_argument(
          "--show-number",
          "-n",
          type=int,
          default=sys.maxsize,
          help="number of images selected to visualize, "
          "must bigger than 0. if the number is bigger than length "
          "of dataset, show all the images in dataset; "
          'default "sys.maxsize", show all images in dataset',
      )
      parser.add_argument(
          "--show-interval",
          "-i",
          type=float,
          default=3,
          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.",
      )
      args = parser.parse_args()
      return args
  
imports: import argparse
  import os.path
  import sys
  from typing import Optional, Tuple
  import cv2
  import mmcv
  import numpy
  from mmengine.config import Config, DictAction
  from mmengine.dataset import Compose
  from mmengine.registry import init_default_scope
  from mmengine.utils import ProgressBar
  from mmengine.visualization import Visualizer
  from mmocr.registry import DATASETS, VISUALIZERS
label_desc: Use image node_id 1 for calling a global function with example usage: parse_args() and returns: args