code: def parse_args():
      parser = ArgumentParser()
      parser.add_argument("img", help="Image file")
      parser.add_argument("config", help="Config file")
      parser.add_argument("checkpoint", help="Checkpoint file")
      parser.add_argument(
          "model_name", help="The model name in the server"
      )
      parser.add_argument(
          "--inference-addr",
          default="127.0.0.1:8080",
          help="Address and port of the inference server",
      )
      parser.add_argument(
          "--device", default="cuda:0", help="Device used for inference"
      )
      parser.add_argument(
          "--score-thr",
          type=float,
          default=0.5,
          help="bbox score threshold",
      )
      parser.add_argument(
          "--work-dir",
          type=str,
          default=None,
          help="output directory to save drawn results.",
      )
      args = parser.parse_args()
      return args
  
file_path: mmdetection/tools/deployment/test_torchserver.py
imports: import os
  from argparse import ArgumentParser
  import mmcv
  import requests
  import torch
  from mmengine.structures import InstanceData
  from mmdet.apis import inference_detector, init_detector
  from mmdet.registry import VISUALIZERS
  from mmdet.structures import DetDataSample
label_desc: Use image node_id 1 for calling a global function with example usage: parse_args() and returns: args