code: def test_consume_wrong_node_type(datadir):
      model = onnx.load(datadir.file("keras_linear_131.onnx"))
      parser = NetworkParser()
      parser.parse_network(model.graph, None, None)
  
      with pytest.raises(ValueError) as excinfo:
          parser._consume_dense_nodes(
              parser._nodes[
                  "StatefulPartitionedCall/keras_linear_131/dense/BiasAdd"
              ][1],
              parser._nodes[
                  "StatefulPartitionedCall/keras_linear_131/dense/BiasAdd"
              ][2],
          )
      expected_msg_dense = "StatefulPartitionedCall/keras_linear_131/dense/BiasAdd is a Add node, only MatMul nodes can be used as starting points for consumption."
      assert str(excinfo.value) == expected_msg_dense
  
      with pytest.raises(ValueError) as excinfo:
          parser._consume_gemm_dense_nodes(
              parser._nodes[
                  "StatefulPartitionedCall/keras_linear_131/dense/BiasAdd"
              ][1],
              parser._nodes[
                  "StatefulPartitionedCall/keras_linear_131/dense/BiasAdd"
              ][2],
          )
      expected_msg_gemm = "StatefulPartitionedCall/keras_linear_131/dense/BiasAdd is a Add node, only Gemm nodes can be used as starting points for consumption."
      assert str(excinfo.value) == expected_msg_gemm
  
      with pytest.raises(ValueError) as excinfo:
          parser._consume_conv_nodes(
              parser._nodes[
                  "StatefulPartitionedCall/keras_linear_131/dense/BiasAdd"
              ][1],
              parser._nodes[
                  "StatefulPartitionedCall/keras_linear_131/dense/BiasAdd"
              ][2],
          )
      expected_msg_conv = "StatefulPartitionedCall/keras_linear_131/dense/BiasAdd is a Add node, only Conv nodes can be used as starting points for consumption."
      assert str(excinfo.value) == expected_msg_conv
  
      with pytest.raises(ValueError) as excinfo:
          parser._consume_reshape_nodes(
              parser._nodes[
                  "StatefulPartitionedCall/keras_linear_131/dense/BiasAdd"
              ][1],
              parser._nodes[
                  "StatefulPartitionedCall/keras_linear_131/dense/BiasAdd"
              ][2],
          )
      expected_msg_reshape = "StatefulPartitionedCall/keras_linear_131/dense/BiasAdd is a Add node, only Reshape nodes can be used as starting points for consumption."
      assert str(excinfo.value) == expected_msg_reshape
  
      with pytest.raises(ValueError) as excinfo:
          parser._consume_pool_nodes(
              parser._nodes[
                  "StatefulPartitionedCall/keras_linear_131/dense/BiasAdd"
              ][1],
              parser._nodes[
                  "StatefulPartitionedCall/keras_linear_131/dense/BiasAdd"
              ][2],
          )
      expected_msg_pool = """StatefulPartitionedCall/keras_linear_131/dense/BiasAdd is a Add node, only MaxPool nodes can be used as starting points for consumption."""
      assert str(excinfo.value) == expected_msg_pool
  
file_path: OMLT/tests/io/test_onnx_parser.py
imports: import pytest
  from omlt.dependencies import onnx, onnx_available
label_desc: Use image node_id 11 for calling a global function with example usage: test_consume_wrong_node_type(datadir) without return types