'Create a DMP out of the given representation.'

def per(f, rep, dom=None, kill=False, ring=None):

    lev = f.lev
    if kill:
        if (not lev):
            return rep
        else:
            lev -= 1
    if (dom is None):
        dom = f.dom
    if (ring is None):
        ring = f.ring
    return DMP(rep, dom, lev, ring)
