code: def test_models_onnx_export(arch_name, input_shape, output_size):
      # Model
      batch_size = 2
      model = classification.__dict__[arch_name](pretrained=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 == (batch_size, *output_size)
  
file_path: doctr/tests/pytorch/test_models_classification_pt.py
imports: import os
  import tempfile
  import cv2
  import numpy
  import onnxruntime
  import pytest
  import torch
  from doctr.models import classification
  from doctr.models.classification.predictor import CropOrientationPredictor
  from doctr.models.utils import export_model_to_onnx
label_desc: Use image node_id 6 for calling a global function with example usage: test_models_onnx_export(arch_name, input_shape, output_size) without return types