code: def test_matrix_indexing(self):
      mat = DenseMatrix(3, 2, [0, 1, 4, 6, 8, 10])
      expected = [[0, 6], [1, 8], [4, 10]]
      for i in range(3):
          for j in range(2):
              self.assertEqual(mat[i, j], expected[i][j])
  
      for i, j in [(-1, 0), (4, 1), (3, 4)]:
          self.assertRaises(IndexError, mat.__getitem__, (i, j))
  
imports: import unittest
  import array
  from numpy import arange, array, array_equal, inf, ones, tile, zeros
  from pyspark.serializers import CPickleSerializer
  from pyspark.ml.linalg import DenseMatrix, DenseVector, MatrixUDT, SparseMatrix, SparseVector, Vector, VectorUDT, Vectors
  from pyspark.testing.mllibutils import MLlibTestCase
  from pyspark.sql import Row
  from pyspark.sql.functions import unwrap_udt
label_desc: Use image node_id 11 for calling the VectorTests obj's underlying member method code with example usage: obj.test_matrix_indexing() without return types