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

def to_sympy_dict(f, zero=False):

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