'Convert ``f`` to a dict representation with SymPy coefficients.'

def to_sympy_dict(f):

    rep = dmp_to_dict(f.rep, 0, f.dom)
    for (k, v) in rep.items():
        rep[k] = f.dom.to_sympy(v)
    return rep
