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

    def _genpop(n, pickfrom=[], acceptfunc=(lambda s: True), producesizes=False):
        producedpop = []
        producedpopsizes = []
        while (len(producedpop) < n):
            if (len(pickfrom) > 0):
                aspirant = pickfrom.pop()
                if acceptfunc(len(aspirant)):
                    producedpop.append(aspirant)
                    if producesizes:
                        producedpopsizes.append(len(aspirant))
            else:
                opRandom = random.random()
                if (opRandom < cxpb):
                    (aspirant1, aspirant2) = toolbox.mate(*map(toolbox.clone, toolbox.select(population, 2)))
                    del aspirant1.fitness.values, aspirant2.fitness.values
                    if acceptfunc(len(aspirant1)):
                        producedpop.append(aspirant1)
                        if producesizes:
                            producedpopsizes.append(len(aspirant1))
                    if ((len(producedpop) < n) and acceptfunc(len(aspirant2))):
                        producedpop.append(aspirant2)
                        if producesizes:
                            producedpopsizes.append(len(aspirant2))
                else:
                    aspirant = toolbox.clone(toolbox.select(population, 1)[0])
                    if ((opRandom - cxpb) < mutpb):
                        aspirant = toolbox.mutate(aspirant)[0]
                        del aspirant.fitness.values
                    if acceptfunc(len(aspirant)):
                        producedpop.append(aspirant)
                        if producesizes:
                            producedpopsizes.append(len(aspirant))
        if producesizes:
            return (producedpop, producedpopsizes)
        else:
            return producedpop
    def halflifefunc(x):
        return ((x * float(alpha)) + beta)
    if (nbrindsmodel == (-1)):
        nbrindsmodel = max(2000, len(population))
    logbook = tools.Logbook()
    logbook.header = (['gen', 'nevals'] + (stats.fields if stats else []))
 ...

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

def harm(population, toolbox, cxpb, mutpb, ngen, alpha, beta, gamma, rho, nbrindsmodel=(-1), mincutoff=20, stats=None, halloffame=None, verbose=__debug__):