code: def test_model_trace_onnx(self):
      model = MobileNetV2(
          weights=None, input_shape=[224, 224, 3], classes=10
      )
      model = Model(inputs=model.inputs, outputs=model.outputs)
      input_examples = np.random.random((100, 224, 224, 3))
  
      # trace a Keras model
      spec = tf.TensorSpec((None, 224, 224, 3), tf.float32)
      onnx_model = InferenceOptimizer.trace(
          model,
          accelerator="onnxruntime",
          input_spec=spec,
          thread_num=4,
      )
  
      y_hat = onnx_model(input_examples[:10])
      assert y_hat.shape == (10, 10)
  
      y_hat = onnx_model.predict(input_examples, batch_size=5)
      assert y_hat.shape == (100, 10)
  
      preds = model.predict(input_examples, batch_size=5)
      onnx_preds = onnx_model.predict(input_examples, batch_size=5)
      np.testing.assert_allclose(preds, onnx_preds, rtol=1e-5)
  
file_path: BigDL/python/nano/test/onnx/tf/test_onnx.py
imports: import tempfile
  from unittest import TestCase
  import tensorflow
  from tensorflow.keras.applications import MobileNetV2
  import numpy
  from bigdl.nano.tf.keras import Model, InferenceOptimizer
  from bigdl.nano.deps.onnxruntime.tensorflow.model import KerasONNXRuntimeModel
label_desc: Use image node_id 1 for calling the TestONNX obj's underlying member method code with example usage: obj.test_model_trace_onnx() without return types