code: def test_fancy_indexing(self):
      a = self.a
      x = a[1, [0, 1, 0]]
      assert_(isinstance(x, matrix))
      assert_equal(x, matrix([[3, 4, 3]]))
      x = a[[1, 0]]
      assert_(isinstance(x, matrix))
      assert_equal(x, matrix([[3, 4], [1, 2]]))
      x = a[[[1], [0]], [[1, 0], [0, 1]]]
      assert_(isinstance(x, matrix))
      assert_equal(x, matrix([[4, 3], [1, 2]]))
  
imports: import collections.abc
  import numpy
  from numpy import matrix, asmatrix, bmat
  from numpy.testing import assert_, assert_equal, assert_almost_equal, assert_array_equal, assert_array_almost_equal, assert_raises
  from numpy.linalg import matrix_power
label_desc: Use image node_id 4 for calling the TestNewScalarIndexing obj's underlying member method code with example usage: obj.test_fancy_indexing() without return types