code: def parse_args():
      parser = argparse.ArgumentParser(
          description="export fairseq checkpoint", usage=""
      )
      parser.add_argument(
          "--model",
          "-m",
          type=str,
          default="checkpoint_best.pt",
          help="path of fairseq checkpoint",
      )
      parser.add_argument(
          "--hdf5",
          "-hdf5",
          action="store_true",
          help="whether to store hdf5",
      )
      parser.add_argument(
          "--generation_method",
          "-g",
          type=str,
          default="beam_search",
          choices=["beam_search", "topk_greedy", "topk", "topp", "ppl"],
          help="generation method",
      )
      args = parser.parse_args()
      return args
  
file_path: lightseq/examples/inference/python/export/util.py
imports: import argparse
  import tensorflow
  import h5py
  from export.proto.transformer_pb2 import Transformer
  from lightseq.training import export_pb2hdf5
  from lightseq.training import export_quant_pb2hdf5
label_desc: Use image node_id 1 for calling a global function with example usage: parse_args() and returns: args