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

    client_log_store = ObjectStore.GetInstance(ObjectStore.USER_LOG)
    total_failures = 0
    text = ''
    days = []
    for f in sorted(filenames):
        day = f.split('/')[(-1)]
        if (day <= start_date):
            continue
        contents = (yield gen.Task(merged_store.Get, f))
        trace_list = json.loads(contents)
        failures = 0
        day_text = ''
        def _S3URL(filename):
            return client_log_store.GenerateUrl(filename, expires_in=(constants.SECONDS_PER_DAY * options.options.s3_url_expiration_days), content_type='text/plain')
        def _UserDeviceURL(user_id, device_id):
            return ('https://staging.viewfinder.co/admin/db?table=Device&type=view&hash_key=%s&sort_key=%s&sort_desc=EQ' % (user_id, device_id))
        for entry in trace_list:
            if (entry.get('type', None) != 'abort'):
                continue
            trace = entry.get('trace', None)
            if (not trace):
                continue
            parsed = logs_util.ParseAbortMsg(trace)
            if (not parsed):
                continue
            (user, device, op, classname, methodname, _) = parsed
            s3path = os.path.join(user, day, 'op', ('%s.%s' % (classname, methodname)), op, '0')
            context_before = entry.get('context_before')
            context = (('\n' + '                \n'.join(context_before)) if context_before else 'None')
            day_text += ('\nMessage:    %s\nPrevious    lines:    %s\nDevice:    %s\nOp    log:    %s\n' % (trace, context, _UserDeviceURL(user, device), _S3URL(s3path)))
            failures += 1
        days.append(day)
        if failures:
            text += (('\n--------    %d    ABORT    messages    for    %s    --------\n' % (failures, day)) + day_text)
            total_failures += failures
    if (total_failures > 0):
        title = ('Abort    messages    for    %s' % ',    '.join(days))
        (yield gen.Task(_SendEmail, 'Aborts', title, text))
    callback()

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

@gen.engine
def ComputeAborts(merged_store, filenames, start_date, callback):