code: def test_fancy_indexing():
      # The matrix class messes with the shape. While this is always
      # weird (getitem is not used, it does not have setitem nor knows
      # about fancy indexing), this tests gh-3110
      # 2018-04-29: moved here from core.tests.test_index.
      m = np.matrix([[1, 2], [3, 4]])
  
      assert_(isinstance(m[[0, 1, 0], :], np.matrix))
  
      # gh-3110. Note the transpose currently because matrices do *not*
      # support dimension fixing for fancy indexing correctly.
      x = np.asmatrix(np.arange(50).reshape(5, 10))
      assert_equal(x[:2, np.array(-1)], x[:2, -1].T)
  
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 1 for calling a global function with example usage: test_fancy_indexing() without return types