code: def _check_fails(
      self,
      function_text: str,
      input_types: Sequence[TypeProto],
      attributes: Sequence[AttributeProto],
  ):
      function = onnx.parser.parse_function(function_text)
  
      def invoke_inference():
          onnx.shape_inference.infer_function_output_types(
              function, input_types, attributes
          )
  
      self.assertRaises(
          onnx.shape_inference.InferenceError, invoke_inference
      )
  
file_path: onnx/onnx/test/function_inference_test.py
imports: import unittest
  from typing import Sequence
  from shape_inference_test import TestShapeInferenceHelper
  import onnx
  import onnx.helper
  import onnx.parser
  import onnx.shape_inference
  from onnx import AttributeProto, TypeProto
label_desc: Use image node_id 2 for calling the TestFunctionInference obj's underlying member method code with example usage: obj._check_fails(function_text, input_types, attributes) without return types