code: def parse_args():
      parser = argparse.ArgumentParser(description="Model quant")
  
      parser.add_argument(
          "--config",
          dest="cfg",
          help="The config file.",
          default=None,
          type=str,
      )
      parser.add_argument(
          "--model_dir",
          dest="model_dir",
          help="The directory of model",
          type=str,
          default=None,
      )
      parser.add_argument(
          "--batch_nums",
          dest="batch_nums",
          help="number of iterations. If set to None , it will run until the end of the sample_generator iteration, otherwise, the number of iterations is batch_nums, that is, the number of samples involved in Scale correction is batch_nums * batch_size .",
          type=int,
          default=10,
      )
      parser.add_argument(
          "--batch_size",
          dest="batch_size",
          help="Number of pictures per batch",
          type=int,
          default=1,
      )
      parser.add_argument(
          "--opts",
          help="Update the key-value pairs of all options.",
          nargs="+",
      )
  
      return parser.parse_args()
  
file_path: PaddleSeg/deploy/slim/quant/ptq.py
imports: import argparse
  import os
  import numpy
  import shutil
  import paddle
  from paddleslim.quant import quant_post_static
  from paddleseg.cvlibs import Config, SegBuilder
label_desc: Use image node_id 1 for calling a global function with example usage: parse_args() and returns: parser