human
I wrote the below code

    def rewrite_rl(expr, assumptions=True):
        for match in unify(source, expr, {}, variables=variables):
            if (condition and (not condition(*[match.get(var, var) for var in variables]))):
                continue
            if (assume and (not ask(assume.xreplace(match), assumptions))):
                continue
            expr2 = subs(match)(target)
            if isinstance(expr2, Expr):
                expr2 = rebuild(expr2)
            (yield expr2)
    return rewrite_rl

What's a good function header?
 Here's a good function header?
assistant
#Here's a good function header.

def rewriterule(source, target, variables=(), condition=None, assume=None):