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)]
            update += ('%(var)s_iter    +=    %(var)s_jump%(index)s_%(i)s;\n' % locals())
            if (index != 'x'):
                suitable_n = ('%(var)s_n%(index)s' % locals())
        return ('\n                                %(preloop)s\n                                for    (int    %(iterv)s    =    %(suitable_n)s.
   %(iterv)s.
   %(iterv)s--)    {\n                                                %(code)s\n                                                %(update)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)
    if (len(loop_tasks) == 1):
        s = preloops.get(0, '')
    else:
        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_careduce(loop_orders, dtypes, loop_tasks, sub):