code: def test_EncDecRNNTModel_export_to_onnx(self, citrinet_rnnt_model):
      model = citrinet_rnnt_model.cuda()
  
      with tempfile.TemporaryDirectory() as tmpdir:
          fn = "citri_rnnt.onnx"
          filename = os.path.join(tmpdir, fn)
          files, descr = model.export(output=filename, verbose=False)
  
          encoder_filename = os.path.join(tmpdir, "encoder-" + fn)
          assert files[0] == encoder_filename
          assert os.path.exists(encoder_filename)
          onnx_model = onnx.load(encoder_filename)
          onnx.checker.check_model(
              onnx_model, full_check=True
          )  # throws when failed
          assert len(onnx_model.graph.input) == 2
          assert len(onnx_model.graph.output) == 2
          assert onnx_model.graph.input[0].name == "audio_signal"
          assert onnx_model.graph.input[1].name == "length"
          assert onnx_model.graph.output[0].name == "outputs"
          assert onnx_model.graph.output[1].name == "encoded_lengths"
  
          decoder_joint_filename = os.path.join(
              tmpdir, "decoder_joint-" + fn
          )
          assert files[1] == decoder_joint_filename
          assert os.path.exists(decoder_joint_filename)
          onnx_model = onnx.load(decoder_joint_filename)
          onnx.checker.check_model(
              onnx_model, full_check=True
          )  # throws when failed
  
          input_examples = model.decoder.input_example()
          assert type(input_examples[-1]) == tuple
          num_states = len(input_examples[-1])
          state_name = list(model.decoder.output_types.keys())[-1]
  
          # enc_logits + (all decoder inputs - state tuple) + flattened state list
          assert len(onnx_model.graph.input) == (
              1 + (len(input_examples) - 1) + num_states
          )
          assert onnx_model.graph.input[0].name == "encoder_outputs"
          assert onnx_model.graph.input[1].name == "targets"
          assert onnx_model.graph.input[2].name == "target_length"
  
          if num_states > 0:
              for idx, ip in enumerate(onnx_model.graph.input[3:]):
                  assert ip.name == "input_" + state_name + "_" + str(
                      idx + 1
                  )
  
          assert (
              len(onnx_model.graph.output)
              == (len(input_examples) - 1) + num_states
          )
          assert onnx_model.graph.output[0].name == "outputs"
          assert onnx_model.graph.output[1].name == "prednet_lengths"
  
          if num_states > 0:
              for idx, op in enumerate(onnx_model.graph.output[2:]):
                  assert op.name == "output_" + state_name + "_" + str(
                      idx + 1
                  )
  
imports: import os
  import tempfile
  import onnx
  import pytest
  import torch.cuda
  from omegaconf import DictConfig, ListConfig, OmegaConf
  from nemo.collections.asr.models import EncDecClassificationModel, EncDecCTCModel, EncDecRNNTModel, EncDecSpeakerLabelModel
  from nemo.collections.asr.parts.utils import asr_module_utils
  from nemo.collections.common.parts.adapter_modules import LinearAdapterConfig
  from nemo.core.utils import numba_utils
  from nemo.core.utils.numba_utils import __NUMBA_MINIMUM_VERSION__
label_desc: Use image node_id 8 for calling the TestExportable obj's underlying member method code with example usage: obj.test_EncDecRNNTModel_export_to_onnx(citrinet_rnnt_model) without return types