code: def parse_args(in_args=None):
      parser = argparse.ArgumentParser(
          description="Visualize ground-truth data"
      )
      parser.add_argument(
          "--source",
          choices=["annotation", "dataloader"],
          required=True,
          help="visualize the annotations or the data loader (with pre-processing)",
      )
      parser.add_argument(
          "--config-file", metavar="FILE", help="path to config file"
      )
      parser.add_argument(
          "--output-dir", default="./", help="path to output directory"
      )
      parser.add_argument(
          "--show", action="store_true", help="show output in a window"
      )
      parser.add_argument(
          "opts",
          help="Modify config options using the command-line",
          default=None,
          nargs=argparse.REMAINDER,
      )
      return parser.parse_args(in_args)
  
file_path: detectron2/tools/visualize_data.py
imports: import argparse
  import os
  from itertools import chain
  import cv2
  import tqdm
  from detectron2.config import get_cfg
  from detectron2.data import DatasetCatalog, MetadataCatalog, build_detection_train_loader
  from detectron2.data import detection_utils
  from detectron2.data.build import filter_images_with_few_keypoints
  from detectron2.utils.logger import setup_logger
  from detectron2.utils.visualizer import Visualizer
label_desc: Use image node_id 2 for calling a global function with example usage: parse_args(in_args) and returns: parser