human
Here's a good function header given the following:
I wrote the below code

    if (evaluate is None):
        evaluate = global_evaluate[0]
    def make_expression(terms):
        product = []
        for (term, rat, sym, deriv) in terms:
            if (deriv is not None):
                (var, order) = deriv
                while (order > 0):
                    (term, order) = (Derivative(term, var), (order - 1))
            if (sym is None):
                if (rat is S.One):
                    product.append(term)
                else:
                    product.append(Pow(term, rat))
            else:
                product.append(Pow(term, (rat * sym)))
        return Mul(*product)
    def parse_derivative(deriv):
        (expr, sym, order) = (deriv.expr, deriv.variables[0], 1)
        for s in deriv.variables[1:]:
            if (s == sym):
                order += 1
            else:
                raise NotImplementedError('Improve    MV    Derivative    support    in    collect')
        while isinstance(expr, Derivative):
            s0 = expr.variables[0]
            for s in expr.variables:
                if (s != s0):
                    raise NotImplementedError('Improve    MV    Derivative    support    in    collect')
            if (s0 == sym):
                (expr, order) = (expr.expr, (order + len(expr.variables)))
            else:
                break
        return (expr, (sym, Rational(order)))
    def parse_term(expr):
        'Parses    expression    expr    and    outputs    tuple    (sexpr,    rat_expo,\n                                sym_expo,    deriv)\n                                where:\n                                    -    sexpr    is    the    base    expression\n                                    -    rat_expo    is    the    rational    exponent    that    sexpr    is    raised    to\n                                    -    sym_expo    is    the    symbolic    exponent    that    sexpr    is    raised    to\n                                    -    deriv    contains    the    derivatives    the    the    expression\n\n           ...

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

def collect(expr, syms, func=None, evaluate=None, exact=False, distribute_order_term=True):