code: def test_DDM_getsetitem():
      ddm = DDM([[ZZ(2), ZZ(3)], [ZZ(4), ZZ(5)]], (2, 2), ZZ)
  
      assert ddm[0][0] == ZZ(2)
      assert ddm[0][1] == ZZ(3)
      assert ddm[1][0] == ZZ(4)
      assert ddm[1][1] == ZZ(5)
  
      raises(IndexError, lambda: ddm[2][0])
      raises(IndexError, lambda: ddm[0][2])
  
      ddm[0][0] = ZZ(-1)
      assert ddm[0][0] == ZZ(-1)
  
imports: from sympy.testing.pytest import raises
  from sympy.external.gmpy import GROUND_TYPES
  from sympy.polys import ZZ, QQ
  from sympy.polys.matrices.ddm import DDM
  from sympy.polys.matrices.exceptions import DMShapeError, DMNonInvertibleMatrixError, DMDomainError, DMBadInputError
label_desc: Use image node_id 2 for calling a global function with example usage: test_DDM_getsetitem() without return types