human
I wrote the below code

    f = func.func
    x = func.args[0]
    def abc(eq):
        '\n                                Internal    function    of    _linear_coeff_match\n                                that    returns    Rationals    a,    b,    c\n                                if    eq    is    a*x    +    b*f(x)    +    c,    else    None.\n                                '
        eq = _mexpand(eq)
        c = eq.as_independent(x, f(x), as_Add=True)[0]
        if (not c.is_Rational):
            return
        a = eq.coeff(x)
        if (not a.is_Rational):
            return
        b = eq.coeff(f(x))
        if (not b.is_Rational):
            return
        if (eq == (((a * x) + (b * f(x))) + c)):
            return (a, b, c)
    def match(arg):
        '\n                                Internal    function    of    _linear_coeff_match    that    returns    Rationals    a1,\n                                b1,    c1,    a2,    b2,    c2    and    a2*b1    -    a1*b2    of    the    expression    (a1*x    +    b1*f(x)\n                                +    c1)/(a2*x    +    b2*f(x)    +    c2)    if    one    of    c1    or    c2    and    a2*b1    -    a1*b2    is\n                                non-zero,    else    None.\n                                '
        (n, d) = arg.together().as_numer_denom()
        m = abc(n)
        if (m is not None):
            (a1, b1, c1) = m
            m = abc(d)
            if (m is not None):
                (a2, b2, c2) = m
                d = ((a2 * b1) - (a1 * b2))
                if ((c1 or c2) and d):
                    return (a1, b1, c1, a2, b2, c2, d)
    m = ([fi.args[0] for fi in expr.atoms(Function) if ((fi.func != f) and (len(fi.args) == 1) and (not fi.args[0].is_Function))] or {expr})
    m1 = match(m.pop())
    if (m1 and all(((match(mi) == m1) for mi in m))):
        (a1, b1, c1, a2, b2, c2, denom) = m1
        return ((((b2 * c1) - (b1 * c2)) / denom), (((a1 * c2) - (a2 * c1)) / denom))

What's a good function header?

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

def _linear_coeff_match(expr, func):