code: def parse_args():
      parser = argparse.ArgumentParser(description="Model training")
      parser.add_argument(
          "--config",
          dest="cfg",
          help="The config file.",
          default=None,
          type=str,
      )
      parser.add_argument(
          "--opts",
          help="Update the key-value pairs of all options.",
          default=None,
          nargs="+",
      )
      parser.add_argument(
          "--model_path",
          dest="model_path",
          help="The path of model for evaluation",
          type=str,
          default=None,
      )
      parser.add_argument(
          "--save_dir",
          dest="save_dir",
          help="The directory for saving the model snapshot",
          type=str,
          default="./output/results",
      )
      parser.add_argument(
          "--num_workers",
          dest="num_workers",
          help="Num workers for data loader",
          type=int,
          default=0,
      )
      parser.add_argument(
          "--save_results",
          dest="save_results",
          help="save prediction alpha while evaluating",
          action="store_true",
      )
      parser.add_argument(
          "--metrics",
          dest="metrics",
          nargs="+",
          help='The metrics to evaluate, it may be the combination of ("sad", "mse", "grad", "conn")',
          type=str,
          default="sad",
      )
      parser.add_argument(
          "--device",
          dest="device",
          help="Set the device type, which may be GPU, CPU or XPU.",
          default="gpu",
          type=str,
      )
  
      return parser.parse_args()
  
file_path: PaddleSeg/Matting/tools/val.py
imports: import argparse
  import os
  import sys
  import paddle
  import paddleseg
  from paddleseg.cvlibs import manager
  from paddleseg.utils import get_sys_env, logger, utils
  import ppmatting
  from ppmatting.core import evaluate, evaluate_ml
  from ppmatting.utils import Config, MatBuilder
label_desc: Use image node_id 1 for calling a global function with example usage: parse_args() and returns: parser