code: def test_ddm_inv():
      A = []
      Ainv = []
      ddm_iinv(Ainv, A, QQ)
      assert Ainv == A
  
      A = []
      Ainv = []
      raises(DMDomainError, lambda: ddm_iinv(Ainv, A, ZZ))
  
      A = [[QQ(1), QQ(2)]]
      Ainv = [[QQ(0), QQ(0)]]
      raises(DMNonSquareMatrixError, lambda: ddm_iinv(Ainv, A, QQ))
  
      A = [[QQ(1, 1), QQ(2, 1)], [QQ(3, 1), QQ(4, 1)]]
      Ainv = [[QQ(0), QQ(0)], [QQ(0), QQ(0)]]
      Ainv_expected = [[QQ(-2, 1), QQ(1, 1)], [QQ(3, 2), QQ(-1, 2)]]
      ddm_iinv(Ainv, A, QQ)
      assert Ainv == Ainv_expected
  
      A = [[QQ(1, 1), QQ(2, 1)], [QQ(2, 1), QQ(4, 1)]]
      Ainv = [[QQ(0), QQ(0)], [QQ(0), QQ(0)]]
      raises(DMNonInvertibleMatrixError, lambda: ddm_iinv(Ainv, A, QQ))
  
file_path: sympy/sympy/polys/matrices/tests/test_dense.py
imports: from sympy.testing.pytest import raises
  from sympy.polys import ZZ, QQ
  from sympy.polys.matrices.ddm import DDM
  from sympy.polys.matrices.dense import ddm_transpose, ddm_iadd, ddm_isub, ddm_ineg, ddm_imatmul, ddm_imul, ddm_irref, ddm_idet, ddm_iinv, ddm_ilu, ddm_ilu_split, ddm_ilu_solve, ddm_berk
  from sympy.polys.matrices.exceptions import DMDomainError, DMNonInvertibleMatrixError, DMNonSquareMatrixError, DMShapeError
label_desc: Use image node_id 9 for calling a global function with example usage: test_ddm_inv() without return types