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

    last_record = None
    for (line_num, line) in enumerate(lines):
        line = line.rstrip('\r\n')
        def fake_record():
            return dict(caller_location='', level='', logger='', message=line, num_lines=1, start_line=line_num, thread='', timestamp='')
        if pre_filter:
            if pre_filter(line):
                if last_record:
                    last_record['num_lines'] = (line_num - last_record['start_line'])
                    (yield last_record)
                (yield fake_record())
                last_record = None
                continue
        m = (_HADOOP_LOG4J_LINE_RE.match(line) or _HADOOP_LOG4J_LINE_ALTERNATE_RE.match(line))
        if m:
            if last_record:
                last_record['num_lines'] = (line_num - last_record['start_line'])
                (yield last_record)
            last_record = m.groupdict()
            last_record.setdefault('caller_location', '')
            last_record['thread'] = (last_record['thread'] or '')
            last_record['start_line'] = line_num
        elif last_record:
            last_record['message'] += ('\n' + line)
        else:
            (yield fake_record())
    if last_record:
        last_record['num_lines'] = ((line_num + 1) - last_record['start_line'])
        (yield last_record)

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

def _parse_hadoop_log4j_records(lines, pre_filter=None):