code: def parse_args():
      parser = argparse.ArgumentParser(
          description="Export Inference Model."
      )
      parser.add_argument(
          "--config", help="The path of config file.", type=str
      )
      parser.add_argument(
          "--model_path",
          help="The path of trained weights for exporting inference model",
          type=str,
      )
      parser.add_argument(
          "--save_dir",
          help="The directory for saving the exported inference model",
          type=str,
          default="./output/inference_model",
      )
      parser.add_argument(
          "--input_shape",
          nargs="+",
          help="Export the model with fixed input shape, e.g., `--input_shape 1 3 1024 1024`.",
          type=int,
          default=None,
      )
      parser.add_argument(
          "--output_op",
          choices=["argmax", "softmax", "none"],
          default="argmax",
          help="Select the op to be appended to the last of inference model, default: argmax."
          "In PaddleSeg, the output of trained model is logit (H*C*H*W). We can apply argmax and"
          "softmax op to the logit according the actual situation.",
      )
  
      return parser.parse_args()
  
file_path: PaddleSeg/contrib/QualityInspector/tools/seg/export.py
imports: import argparse
  import os
  import paddle
  import yaml
  from paddleseg.cvlibs import Config, SegBuilder
  from paddleseg.utils import logger, utils
  from paddleseg.deploy.export import WrappedModel
label_desc: Use image node_id 1 for calling a global function with example usage: parse_args() and returns: parser