human
I wrote the below code

    def distribute_rl(expr):
        for (i, arg) in enumerate(expr.args):
            if isinstance(arg, B):
                (first, b, tail) = (expr.args[:i], expr.args[i], expr.args[(i + 1):])
                return B(*[A(*((first + (arg,)) + tail)) for arg in b.args])
        return expr
    return distribute_rl

What's a good function header?

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

def distribute(A, B):