code: def test_XDM_getitem(DM):
      """Test getitem for DDM, etc."""
  
      lol = [[0, 1], [2, 0]]
      A = DM(lol)
      m, n = A.shape
  
      indices = [-3, -2, -1, 0, 1, 2]
  
      for i in indices:
          for j in indices:
              if -2 <= i < m and -2 <= j < n:
                  assert A.getitem(i, j) == ZZ(lol[i][j])
              else:
                  raises(IndexError, lambda: A.getitem(i, j))
  
imports: from sympy.external.gmpy import GROUND_TYPES
  from sympy import ZZ, QQ, GF, ZZ_I, symbols
  from sympy.polys.matrices.exceptions import DMBadInputError, DMDomainError, DMNonSquareMatrixError, DMNonInvertibleMatrixError, DMShapeError
  from sympy.polys.matrices.domainmatrix import DM, DomainMatrix, DDM, SDM, DFM
  from sympy.testing.pytest import raises, skip
  import pytest
label_desc: Use image node_id 17 for calling a global function with example usage: test_XDM_getitem(DM) without return types