code: def parse_args():
      parser = argparse.ArgumentParser(
          description="export fairseq checkpoint", usage=""
      )
      parser.add_argument(
          "--model_file",
          "-m",
          type=str,
          required=True,
          help="path of pytorch model repo",
      )
      parser.add_argument(
          "--generation_method",
          "-g",
          type=str,
          required=True,
          choices=["beam_search", "topk_greedy", "topk", "topp", "ppl"],
          help="generation method",
      )
      parser.add_argument(
          "--beam_size",
          type=int,
          required=False,
          default=None,
      )
      parser.add_argument(
          "--topk",
          type=int,
          required=False,
          default=None,
      )
      parser.add_argument(
          "--topp",
          type=float,
          required=False,
          default=None,
      )
      parser.add_argument(
          "--extra_decode_length",
          type=int,
          required=False,
          default=None,
      )
      args = parser.parse_args()
      return args
  
file_path: lightseq/lightseq/csrc/export/util.py
imports: import argparse
  from re import L
  import os
  import h5py
  import json
  import numpy
label_desc: Use image node_id 1 for calling a global function with example usage: parse_args() and returns: args