code: def assert_args(args):
      if args.nemo_model is None and args.pretrained_model is None:
          raise ValueError(
              "`nemo_model` or `pretrained_model` must be passed ! It is required for decoding the RNNT tokens "
              "and ensuring predictions match between Torch and Torchscript."
          )
  
      if (
          args.nemo_model is not None
          and args.pretrained_model is not None
      ):
          raise ValueError(
              "`nemo_model` and `pretrained_model` cannot both be passed ! Only one can be passed to this script."
          )
  
      if args.ts_cfg is None:
          raise ValueError(
              "Must provide the yaml config of the exported model. You can obtain it by loading the "
              "nemo model and then using OmegaConf.save(model.cfg, 'cfg.yaml')"
          )
  
      if args.export and (
          args.ts_encoder is not None or args.ts_decoder is not None
      ):
          raise ValueError(
              "If `export` is set, then `ts_encoder` and `ts_decoder` arguments must be None"
          )
  
      if args.audio_dir is None and args.dataset_manifest is None:
          raise ValueError(
              "Both `dataset_manifest` and `audio_dir` cannot be None!"
          )
  
      if (
          args.audio_dir is not None
          and args.dataset_manifest is not None
      ):
          raise ValueError(
              "Submit either `dataset_manifest` or `audio_dir`."
          )
  
      if int(args.max_symbold_per_step) < 1:
          raise ValueError(
              "`max_symbold_per_step` must be an integer > 0"
          )
  
file_path: NeMo/examples/asr/export/transducer/infer_transducer_ts.py
imports: import glob
  import json
  import os
  import tempfile
  from argparse import ArgumentParser
  import torch
  from omegaconf import OmegaConf
  from tqdm import tqdm
  from nemo.collections.asr.metrics.wer import word_error_rate
  from nemo.collections.asr.models import ASRModel
  from nemo.collections.asr.parts.submodules.rnnt_greedy_decoding import TorchscriptGreedyBatchedRNNTInfer
  from nemo.utils import logging
label_desc: Use image node_id 2 for calling a global function with example usage: assert_args(args) without return types