code: def test_dm_inv(name, A, A_inv, den):
      A = A.to_field()
      if den != 0:
          A_inv = A_inv.to_field() / den
          assert A.inv() == A_inv
      else:
          raises(DMNonInvertibleMatrixError, lambda: A.inv())
  
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 3 for calling a global function with example usage: test_dm_inv(name, A, A_inv, den) without return types