code: def test_dense_ddm_iinv(name, A, A_inv, den):
      A = A.to_field().to_ddm().copy()
      K = A.domain
      A_result = A.copy()
      if den != 0:
          A_inv = (A_inv.to_field() / den).to_ddm()
          ddm_iinv(A_result, A, K)
          assert A_result == A_inv
      else:
          raises(
              DMNonInvertibleMatrixError,
              lambda: ddm_iinv(A_result, A, K),
          )
  
file_path: sympy/sympy/polys/matrices/tests/test_inverse.py
imports: from sympy import ZZ
  from sympy.polys.matrices import DM, DomainMatrix
  from sympy.polys.matrices.dense import ddm_iinv
  from sympy.polys.matrices.exceptions import DMNonInvertibleMatrixError
  from sympy.matrices.exceptions import NonInvertibleMatrixError
  import pytest
  from sympy.testing.pytest import raises
label_desc: Use image node_id 6 for calling a global function with example usage: test_dense_ddm_iinv(name, A, A_inv, den) without return types