code: def get_args(argv):
      parser = argparse.ArgumentParser(
          formatter_class=argparse.ArgumentDefaultsHelpFormatter,
          description=f"Export NeMo models to ONNX/Torchscript",
      )
      parser.add_argument("source", help="Source .nemo file")
      parser.add_argument("out", help="Location to write result to")
      parser.add_argument(
          "--autocast",
          action="store_true",
          help="Use autocast when exporting",
      )
      parser.add_argument(
          "--runtime-check",
          action="store_true",
          help="Runtime check of exported net result",
      )
      parser.add_argument(
          "--verbose",
          default=None,
          help="Verbose level for logging, numeric",
      )
      parser.add_argument(
          "--max-batch",
          type=int,
          default=None,
          help="Max batch size for model export",
      )
      parser.add_argument(
          "--max-dim",
          type=int,
          default=None,
          help="Max dimension(s) for model export",
      )
      parser.add_argument(
          "--onnx-opset",
          type=int,
          default=None,
          help="ONNX opset for model export",
      )
      parser.add_argument(
          "--cache_support",
          action="store_true",
          help="enables caching inputs for the models support it.",
      )
      parser.add_argument(
          "--device", default="cuda", help="Device to export for"
      )
      parser.add_argument(
          "--check-tolerance",
          type=float,
          default=0.01,
          help="tolerance for verification",
      )
      parser.add_argument(
          "--export-config",
          metavar="KEY=VALUE",
          nargs="+",
          help="Set a number of key-value pairs to model.export_config dictionary "
          "(do not put spaces before or after the = sign). "
          "Note that values are always treated as strings.",
      )
  
      args = parser.parse_args(argv)
      return args
  
file_path: NeMo/scripts/export.py
imports: import argparse
  import sys
  import torch
  from omegaconf import OmegaConf
  from pytorch_lightning import Trainer
  import nemo
  from nemo.core import ModelPT
  from nemo.core.classes import Exportable
  from nemo.core.config.pytorch_lightning import TrainerConfig
  from nemo.utils import logging
label_desc: Use image node_id 1 for calling a global function with example usage: get_args(argv) and returns: args