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

    from sympy.matrices.expressions.matexpr import MatrixSymbol
    def recurse(arg, **kwargs):
        _deep = kwargs.get('deep', deep)
        _combine = kwargs.get('combine', combine)
        _force = kwargs.get('force', force)
        _measure = kwargs.get('measure', measure)
        return powsimp(arg, _deep, _combine, _force, _measure)
    expr = sympify(expr)
    if ((not isinstance(expr, Basic)) or isinstance(expr, MatrixSymbol) or (expr.is_Atom or (expr in (exp_polar(0), exp_polar(1))))):
        return expr
    if (deep or expr.is_Add or (expr.is_Mul and (_y not in expr.args))):
        expr = expr.func(*[recurse(w) for w in expr.args])
    if expr.is_Pow:
        return (recurse((expr * _y), deep=False) / _y)
    if (not expr.is_Mul):
        return expr
    if (combine in ('exp', 'all')):
        c_powers = defaultdict(list)
        nc_part = []
        newexpr = []
        coeff = S.One
        for term in expr.args:
            if term.is_Rational:
                coeff *= term
                continue
            if term.is_Pow:
                term = _denest_pow(term)
            if term.is_commutative:
                (b, e) = term.as_base_exp()
                if deep:
                    (b, e) = [recurse(i) for i in [b, e]]
                if (b.is_Pow or (b.func is exp)):
                    (b, e) = ((b ** e), S.One)
                c_powers[b].append(e)
            else:
                if nc_part:
                    (b1, e1) = nc_part[(-1)].as_base_exp()
                    (b2, e2) = term.as_base_exp()
                    if ((b1 == b2) and e1.is_commutative and e2.is_commutative):
                        nc_part[(-1)] = Pow(b1, Add(e1, e2))
                        continue
                nc_part.append(term)
        for (b, e) in ordered(iter(c_powers.items())):
            if (b and b.is_Number and (not all((ei.is_Number for ei in e))) and (coeff is not S.One) and (b not in (S.One, S.NegativeOne))):
                m = multiplicity(abs(b), abs(coeff))
                if m:
       ...

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

def powsimp(expr, deep=False, combine='all', force=False, measure=count_ops):