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

    def hashdir(name, levels=[3]):
        h = md5(name).hexdigest()
        last = 0
        dirs = []
        for l in levels:
            dirs.append(h[last:(last + l)])
            last += l
        return os.path.join(*dirs)
    def post(key, maxes):
        hd = os.path.join(dirname, hashdir(key))
        try:
            os.makedirs(hd)
        except OSError as e:
            if (e.errno != errno.EEXIST):
                raise
        filename = os.path.join(hd, key)
        with open(filename, 'w') as f:
            for item in maxes:
                f.write(('%s DCTB ' % key))
                f.write(' DCTB '.join(item))
                f.write('\n')
    mr_tools.mr_reduce_max_per_key((lambda x: map(float, x[:(-1)])), num=1000, post=post)

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

def top1k_writefiles(dirname):