human
I wrote the below code

    if (z is S.Zero):
        return S.One
    z = polarify(z, subs=False)
    if (rewrite == 'default'):
        rewrite = 'nonrepsmall'
    def carryout_plan(f, ops):
        C = apply_operators(f.C.subs(f.z, z0), ops, make_derivative_operator(f.M.subs(f.z, z0), z0))
        from sympy import eye
        C = apply_operators(C, ops0, make_derivative_operator((f.M.subs(f.z, z0) + (prem * eye(f.M.shape[0]))), z0))
        if (premult == 1):
            C = C.applyfunc(make_simp(z0))
        r = ((C * f.B.subs(f.z, z0)) * premult)
        res = r[0].subs(z0, z)
        if rewrite:
            res = res.rewrite(rewrite)
        return res
    global _collection
    if (_collection is None):
        _collection = FormulaCollection()
    debug('Trying    to    expand    hypergeometric    function    ', func)
    (func, ops) = reduce_order(func)
    if ops:
        debug('        Reduced    order    to    ', func)
    else:
        debug('        Could    not    reduce    order.')
    res = try_polynomial(func, z0)
    if (res is not None):
        debug('        Recognised    polynomial.')
        p = apply_operators(res, ops, (lambda f: (z0 * f.diff(z0))))
        p = apply_operators((p * premult), ops0, (lambda f: (z0 * f.diff(z0))))
        return unpolarify(simplify(p).subs(z0, z))
    p = S(0)
    res = try_shifted_sum(func, z0)
    if (res is not None):
        (func, nops, p) = res
        debug('        Recognised    shifted    sum,    reduced    order    to    ', func)
        ops += nops
    p = apply_operators(p, ops, (lambda f: (z0 * f.diff(z0))))
    p = apply_operators((p * premult), ops0, (lambda f: (z0 * f.diff(z0))))
    p = simplify(p).subs(z0, z)
    if ((unpolarify(z) in [1, (-1)]) and ((len(func.ap), len(func.bq)) == (2, 1))):
        f = build_hypergeometric_formula(func)
        r = carryout_plan(f, ops).replace(hyper, hyperexpand_special)
        if (not r.has(hyper)):
            return (r + p)
    formula = _collection.lookup_origin(func)
    if (formula is None):
        formula =...

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

def _hyperexpand(func, z, ops0=[], z0=Dummy('z0'), premult=1, prem=0, rewrite='default'):