code: def parse_val_args(*args, **kwargs):
      parser = argparse.ArgumentParser(description="Model evaluation")
  
      # params of evaluate
      parser.add_argument(
          "--config",
          dest="cfg",
          help="Config file.",
          default=None,
          type=str,
      )
      parser.add_argument(
          "--model_path",
          help="Path of the model to evaluate.",
          type=str,
          default=None,
      )
      parser.add_argument(
          "--num_workers",
          help="Number of workers used in data loader.",
          type=int,
          default=0,
      )
      parser.add_argument(
          "--eval_sem",
          help="To calculate semantic segmentation metrics.",
          action="store_true",
      )
      parser.add_argument(
          "--eval_ins",
          help="To calculate instance segmentation metrics.",
          action="store_true",
      )
      parser.add_argument(
          "--debug", help="To enable debug mode.", action="store_true"
      )
      parser.add_argument(
          "--device",
          help="Device for evaluating model.",
          default="gpu",
          choices=["cpu", "gpu", "xpu", "npu", "mlu"],
          type=str,
      )
  
      return parser.parse_args(*args, **kwargs)
  
imports: import argparse
  import paddleseg
  from paddleseg.utils import logger, utils
  from paddlepanseg.core import evaluate
  from paddlepanseg.cvlibs import Config, make_default_builder
label_desc: Use image node_id 1 for calling a global function with example usage: parse_val_args() and returns: parser