code: def test_array_equal_error_message_matrix():
      # 2018-04-29: moved here from testing.tests.test_utils.
      with pytest.raises(AssertionError) as exc_info:
          assert_equal(np.array([1, 2]), np.matrix([1, 2]))
      msg = str(exc_info.value)
      msg_reference = textwrap.dedent(
          """\
  
      Arrays are not equal
  
      (shapes (2,), (1, 2) mismatch)
       x: array([1, 2])
       y: matrix([[1, 2]])"""
      )
      assert_equal(msg, msg_reference)
  
imports: import pytest
  import textwrap
  import warnings
  import numpy
  from numpy.testing import assert_, assert_equal, assert_raises, assert_raises_regex, assert_array_equal, assert_almost_equal, assert_array_almost_equal
label_desc: Use image node_id 20 for calling a global function with example usage: test_array_equal_error_message_matrix() without return types