human
I wrote the below code

    quick = flags.get('quick', False)
    s0 = solve_linear_system(system, *symbols, **flags)
    if ((not s0) or all(((v == 0) for v in s0.values()))):
        return s0
    if quick:
        s = solve_linear_system(system, *symbols)
        def update(determined, solution):
            delete = []
            for (k, v) in solution.items():
                solution[k] = v.subs(determined)
                if (not solution[k].free_symbols):
                    delete.append(k)
                    determined[k] = solution[k]
            for k in delete:
                del solution[k]
        determined = {}
        update(determined, s)
        while s:
            k = max((k for k in s.values()), key=(lambda x: (len(x.free_symbols), default_sort_key(x))))
            x = max(k.free_symbols, key=default_sort_key)
            if (len(k.free_symbols) != 1):
                determined[x] = S(0)
            else:
                val = solve(k)[0]
                if ((val == 0) and all(((v.subs(x, val) == 0) for v in s.values()))):
                    determined[x] = S(1)
                else:
                    determined[x] = val
            update(determined, s)
        return determined
    else:
        from itertools import combinations
        from sympy.utilities.misc import debug
        N = len(symbols)
        bestsol = minsolve_linear_system(system, quick=True, *symbols)
        n0 = len([x for x in bestsol.values() if (x != 0)])
        for n in range((n0 - 1), 1, (-1)):
            debug(('minsolve:    %s' % n))
            thissol = None
            for nonzeros in combinations(list(range(N)), n):
                subm = Matrix(([system.col(i).T for i in nonzeros] + [system.col((-1)).T])).T
                s = solve_linear_system(subm, *[symbols[i] for i in nonzeros])
                if (s and (not all(((v == 0) for v in s.values())))):
                    subs = [(symbols[v], S(1)) for v in nonzeros]
                    for (k, v) in s.items():
                        s[k] = v.subs(subs)
          ...

What's a good function header?

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

def minsolve_linear_system(system, *symbols, **flags):