code: def test_DDM_str():
      ddm = DDM([[ZZ(0), ZZ(1)], [ZZ(2), ZZ(3)]], (2, 2), ZZ)
      if GROUND_TYPES == "gmpy":  # pragma: no cover
          assert str(ddm) == "[[0, 1], [2, 3]]"
          assert (
              repr(ddm)
              == "DDM([[mpz(0), mpz(1)], [mpz(2), mpz(3)]], (2, 2), ZZ)"
          )
      else:  # pragma: no cover
          assert repr(ddm) == "DDM([[0, 1], [2, 3]], (2, 2), ZZ)"
          assert str(ddm) == "[[0, 1], [2, 3]]"
  
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 3 for calling a global function with example usage: test_DDM_str() without return types