code: def test_XXM_from_ddm(DM):
      T = type(DM([[0]]))
      ddm = DDM([[1, 2, 4], [4, 5, 6]], (2, 3), ZZ)
      assert T.from_ddm(ddm) == DM([[1, 2, 4], [4, 5, 6]])
  
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 30 for calling a global function with example usage: test_XXM_from_ddm(DM) without return types