docstr: Check that the model inference raises an InferenceError.
docstr_tok: ["Check","that","the","model","inference","raises","an","InferenceError","."]
code: def _check_inference_error(self, model_text: str):
      """Check that the model inference raises an InferenceError."""
      model = onnx.parser.parse_model(model_text)
      with self.assertRaises(onnx.shape_inference.InferenceError):
          onnx.shape_inference.infer_shapes(model, True, True)
  
file_path: onnx/onnx/test/model_inference_test.py
imports: import typing
  import unittest
  import onnx
  import onnx.parser
  import onnx.shape_inference
label_desc: Use image node_id 2 for calling the TestModelInference obj's underlying member method code with example usage: obj._check_inference_error(model_text) without return types