code: def _test_onnx_model(
      model,  # type: ModelProto
      test_name="",  # type: Text
      decimal=5,  # type: int
      onnx_coreml_input_shape_map={},  # type: Dict[Text, List[int,...]]
      coreml_input_shape={},  # type: Dict[Text, List[int,...]]
      minimum_ios_deployment_target="12",
  ):
      # type: (...) -> None
      if not test_name:
          test_name = sys._getframe(1).f_code.co_name
      W = _prepare_inputs_for_onnx(model, test_name=test_name)
      c2_outputs = _forward_onnx_model(model, W, test_name=test_name)
      coreml_input_dict = dict()
      # Supported iOS Version
      # New OS Version must be added at the end to maintain backward version index
      supported_ios_version = ["11.2", "12", "13"]
      IOS_13_VERSION = supported_ios_version.index("13")
      for key, value in W.items():
          if (
              supported_ios_version.index(minimum_ios_deployment_target)
              < IOS_13_VERSION
              and key in coreml_input_shape
          ):
              coreml_input_dict[key] = np.reshape(
                  value, coreml_input_shape[key]
              )
          else:
              coreml_input_dict[key] = value
      if _IS_MACOS:
          coreml_outputs = _coreml_forward_onnx_model(
              model,
              coreml_input_dict,
              onnx_coreml_input_shape_map=onnx_coreml_input_shape_map,
              minimum_ios_deployment_target=minimum_ios_deployment_target,
          )
          _assert_outputs(c2_outputs, coreml_outputs, decimal=decimal)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from __future__ import unicode_literals
  import numpy
  import numpy.testing
  import numpy.random
  from onnx import helper, ModelProto, ValueInfoProto, TensorProto, NodeProto
  from typing import Any, Sequence, Text, Tuple, Optional, Dict, List, TypeVar
  from coremltools.converters.onnx import convert
  from coremltools.converters.onnx._converter import SupportedVersion
  from coremltools._deps import _IS_MACOS
  import sys
label_desc: Use image node_id 11 for calling a global function with example usage: _test_onnx_model(model, test_name, decimal, onnx_coreml_input_shape_map, coreml_input_shape, minimum_ios_deployment_target) without return types