code: def test_models_onnx_export(arch_name, input_shape):
      # Model
      batch_size = 2
      model = recognition.__dict__[arch_name](
          pretrained=True, exportable=True
      ).eval()
      dummy_input = torch.rand(
          (batch_size, *input_shape), dtype=torch.float32
      )
      with tempfile.TemporaryDirectory() as tmpdir:
          # Export
          model_path = export_model_to_onnx(
              model,
              model_name=os.path.join(tmpdir, "model"),
              dummy_input=dummy_input,
          )
          assert os.path.exists(model_path)
          # Inference
          ort_session = onnxruntime.InferenceSession(
              os.path.join(tmpdir, "model.onnx"),
              providers=["CPUExecutionProvider"],
          )
          ort_outs = ort_session.run(
              ["logits"], {"input": dummy_input.numpy()}
          )
          assert isinstance(ort_outs, list) and len(ort_outs) == 1
          assert ort_outs[0].shape[0] == batch_size
  
file_path: doctr/tests/pytorch/test_models_recognition_pt.py
imports: import os
  import tempfile
  import onnxruntime
  import psutil
  import pytest
  import torch
  from doctr.models import recognition
  from doctr.models.recognition.crnn.pytorch import CTCPostProcessor
  from doctr.models.recognition.master.pytorch import MASTERPostProcessor
  from doctr.models.recognition.parseq.pytorch import PARSeqPostProcessor
  from doctr.models.recognition.predictor import RecognitionPredictor
  from doctr.models.recognition.sar.pytorch import SARPostProcessor
  from doctr.models.recognition.vitstr.pytorch import ViTSTRPostProcessor
  from doctr.models.utils import export_model_to_onnx
label_desc: Use image node_id 4 for calling a global function with example usage: test_models_onnx_export(arch_name, input_shape) without return types