human
I wrote the below code

    def loop_over(preloop, code, indices, i):
        iterv = ('ITER_%i' % i)
        update = ''
        suitable_n = '1'
        for (j, index) in enumerate(indices):
            var = sub[('lv%i' % j)]
            dtype = dtypes[j]
            update += ('%(dtype)s    &%(var)s_i    =    *    (    %(var)s_iter    +    %(iterv)s    *    %(var)s_jump%(index)s_%(i)s    );\n' % locals())
            if (index != 'x'):
                suitable_n = ('%(var)s_n%(index)s' % locals())
        if openmp:
            openmp_elemwise_minsize = theano.config.openmp_elemwise_minsize
            forloop = ('#pragma    omp    parallel    for    if(    %(suitable_n)s    >=%(openmp_elemwise_minsize)s)\n' % locals())
        else:
            forloop = ''
        forloop += ('for    (int    %(iterv)s    =    0.
   %(iterv)s<%(suitable_n)s.
   %(iterv)s++)' % locals())
        return ('\n                                %(preloop)s\n                                %(forloop)s    {\n                                                %(update)s\n                                                %(code)s\n                                }\n                                ' % locals())
    preloops = {}
    for (i, (loop_order, dtype)) in enumerate(zip(loop_orders, dtypes)):
        for (j, index) in enumerate(loop_order):
            if (index != 'x'):
                preloops.setdefault(j, '')
                preloops[j] += (('%%(lv%(i)s)s_iter    =    (%(dtype)s*)(PyArray_DATA(%%(lv%(i)s)s));\n' % locals()) % sub)
                break
        else:
            preloops.setdefault(0, '')
            preloops[0] += (('%%(lv%(i)s)s_iter    =    (%(dtype)s*)(PyArray_DATA(%%(lv%(i)s)s));\n' % locals()) % sub)
    s = ''
    for (i, (pre_task, task), indices) in reversed(list(zip(xrange((len(loop_tasks) - 1)), loop_tasks, list(zip(*loop_orders))))):
        s = loop_over((preloops.get(i, '') + pre_task), (s + task), indices, i)
    s += loop_tasks[(-1)]
    return ('{%s}' % s)

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

def make_loop(loop_orders, dtypes, loop_tasks, sub, openmp=None):