human
I wrote the below code

    def _rewriter(integral):
        (integrand, symbol) = integral
        if condition(*integral):
            rewritten = rewrite(*integral)
            if (rewritten != integrand):
                substep = integral_steps(rewritten, symbol)
                if ((not isinstance(substep, DontKnowRule)) and substep):
                    return RewriteRule(rewritten, substep, integrand, symbol)
    return _rewriter

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

def rewriter(condition, rewrite):