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

    def do(expr):
        from sympy.concrete.summations import Sum
        from sympy.simplify.simplify import factor_sum
        is_iterable = iterable(expr)
        if ((not isinstance(expr, Basic)) or expr.is_Atom):
            if is_iterable:
                return type(expr)([do(i) for i in expr])
            return expr
        if (expr.is_Pow or expr.is_Function or is_iterable or (not hasattr(expr, 'args_cnc'))):
            args = expr.args
            newargs = tuple([do(i) for i in args])
            if (newargs == args):
                return expr
            return expr.func(*newargs)
        if isinstance(expr, Sum):
            return factor_sum(expr, radical=radical, clear=clear, fraction=fraction, sign=sign)
        (cont, p) = expr.as_content_primitive(radical=radical, clear=clear)
        if p.is_Add:
            list_args = [do(a) for a in Add.make_args(p)]
            if all(((a.as_coeff_Mul()[0] < 0) for a in list_args)):
                cont = (- cont)
                list_args = [(- a) for a in list_args]
            special = {}
            for (i, a) in enumerate(list_args):
                (b, e) = a.as_base_exp()
                if (e.is_Mul and (e != Mul(*e.args))):
                    list_args[i] = Dummy()
                    special[list_args[i]] = a
            p = Add._from_args(list_args)
            p = gcd_terms(p, isprimitive=True, clear=clear, fraction=fraction).xreplace(special)
        elif p.args:
            p = p.func(*[do(a) for a in p.args])
        rv = _keep_coeff(cont, p, clear=clear, sign=sign)
        return rv
    expr = sympify(expr)
    return do(expr)

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

def factor_terms(expr, radical=False, clear=False, fraction=False, sign=True):