human
I wrote the below code

    grouper = rrowfunc(t.grouper, t._child)
    if (isinstance(t.apply, Reduction) and (type(t.apply) in binops)):
        (binop, combiner, initial) = binops[type(t.apply)]
        applier = rrowfunc(t.apply._child, t._child)
        def binop2(acc, x):
            return binop(acc, applier(x))
        return (grouper, binop2, combiner, initial)
    elif (isinstance(t.apply, Summary) and builtins.all(((type(val) in binops) for val in t.apply.values))):
        (binops2, combiners, inits) = zip(*[binops[type(v)] for v in t.apply.values])
        appliers = [rrowfunc(v._child, t._child) for v in t.apply.values]
        def binop2(accs, x):
            return tuple((binop(acc, applier(x)) for (binop, acc, applier) in zip(binops2, accs, appliers)))
        def combiner(a, b):
            return tuple((c(x, y) for (c, x, y) in zip(combiners, a, b)))
        return (grouper, binop2, combiner, tuple(inits))

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

def reduce_by_funcs(t):