code: def test_mlp2_infer_error():
      # Test shape inconsistent case
      out = models.mlp2()
      weight_shape = (1, 100)
      data_shape = (100, 100)
      with pytest.raises(mx.MXNetError):
          arg_shapes, out_shapes, aux_shapes = out.infer_shape(
              data=data_shape, fc1_weight=weight_shape
          )
  
file_path: mxnet/tests/python/unittest/test_infer_shape.py
imports: import mxnet
  from common import models
  import pytest
label_desc: Use image node_id 2 for calling a global function with example usage: test_mlp2_infer_error() without return types