code: def test_matrix_element(self):
      x = matrix([[1, 2, 3], [4, 5, 6]])
      assert_equal(x[0][0], matrix([[1, 2, 3]]))
      assert_equal(x[0][0].shape, (1, 3))
      assert_equal(x[0].shape, (1, 3))
      assert_equal(x[:, 0].shape, (2, 1))
  
      x = matrix(0)
      assert_equal(x[0, 0], 0)
      assert_equal(x[0], 0)
      assert_equal(x[:, 0].shape, x.shape)
  
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 5 for calling the TestNewScalarIndexing obj's underlying member method code with example usage: obj.test_matrix_element() without return types