code: def test_add_inference_raises_errors(self) -> None:
      with self.assertRaises(ValidationError):
          _run_case(
              ADD_SCHEMA,
              ["A"],
              ["C"],
              _to_tensor_types({"A": (TensorProto.FLOAT, (3, 4))}),
          )
      with self.assertRaises(ValidationError):
          _run_case(
              ADD_SCHEMA,
              ["A", "B"],
              ["C"],
              _to_tensor_types(
                  {"A": (TensorProto.FLOAT, (3, 4)), "B": (2, (3, 4))}
              ),
          )
      with self.assertRaises(InferenceError):
          _run_case(
              ADD_SCHEMA,
              ["A", "B"],
              ["C"],
              _to_tensor_types(
                  {
                      "A": (TensorProto.FLOAT, (2, 4)),
                      "B": (TensorProto.FLOAT, (3, 4)),
                  }
              ),
          )
      with self.assertRaises(KeyError):
          _run_case(
              ADD_SCHEMA,
              ["A", "B"],
              ["C"],
              _to_tensor_types({"A": (TensorProto.FLOAT, (3, 4))}),
          )
  
file_path: onnx/onnx/test/inference_function_test.py
imports: import unittest
  from typing import Dict, List, Optional, Tuple, Union
  import numpy
  import onnx
  from onnx import TensorProto, TypeProto
  from onnx.checker import ValidationError
  from onnx.defs import OpSchema, get_all_schemas_with_history, get_schema
  from onnx.helper import make_graph, make_node, make_opsetid, make_tensor_type_proto, make_tensor_value_info
  from onnx.numpy_helper import from_array
  from onnx.shape_inference import InferenceError, infer_node_outputs
label_desc: Use image node_id 2 for calling the TestInferenceFunctionCall obj's underlying member method code with example usage: obj.test_add_inference_raises_errors() without return types