code: def test_DMP_to_dict():
      f = DMP([[ZZ(3)], [], [ZZ(2)], [], [ZZ(8)]], ZZ)
  
      assert f.to_dict() == {(4, 0): 3, (2, 0): 2, (0, 0): 8}
      assert f.to_sympy_dict() == {
          (4, 0): ZZ.to_sympy(3),
          (2, 0): ZZ.to_sympy(2),
          (0, 0): ZZ.to_sympy(8),
      }
  
imports: from sympy.functions.elementary.miscellaneous import sqrt
  from sympy.polys.domains import ZZ, QQ
  from sympy.polys.polyclasses import DMP, DMF, ANP
  from sympy.polys.polyerrors import CoercionFailed, ExactQuotientFailed, NotInvertible
  from sympy.polys.specialpolys import f_polys
  from sympy.testing.pytest import raises, warns_deprecated_sympy
label_desc: Use image node_id 5 for calling a global function with example usage: test_DMP_to_dict() without return types