human
I wrote the below code

    def _find_range_info(diff):
        lines = split_line_endings(diff)
        process_changes = False
        process_trailing_context = False
        ranges = []
        chunk_start = None
        chunk_len = 0
        lines_of_context = 0
        for line in lines:
            if process_changes:
                if line.startswith(('-', '+')):
                    start = ((chunk_start - 1) + lines_of_context)
                    chunk_len -= lines_of_context
                    if (lines_of_context > 0):
                        start -= 1
                    ranges.append((start, (start + chunk_len)))
                    process_changes = False
                    process_trailing_context = True
                    lines_of_context = 0
                    continue
                else:
                    lines_of_context += 1
            elif process_trailing_context:
                if line.startswith('    '):
                    lines_of_context += 1
                    continue
                else:
                    lines_of_context = 0
            m = CHUNK_RANGE_RE.match(line)
            if m:
                if (process_trailing_context and (lines_of_context > 0)):
                    last_range = ranges[(-1)]
                    ranges[(-1)] = (last_range[0], (last_range[1] - lines_of_context))
                chunk_start = int(m.group(u'new_start'))
                chunk_len = int((m.group(u'new_len') or u'1'))
                process_changes = True
                process_trailing_context = False
                lines_of_context = 0
        if (process_trailing_context and (lines_of_context > 0)):
            last_range = ranges[(-1)]
            ranges[(-1)] = (last_range[0], (last_range[1] - lines_of_context))
        return ranges
    def _is_range_valid(line_range, tag, i1, i2):
        return ((line_range is not None) and (i1 >= line_range[0]) and ((tag == u'delete') or (i1 != i2)))
    orig_ranges = _find_range_info(filediff_data)
    new_ranges = _find_range_info(interfilediff_data)
...

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

def filter_interdiff_opcodes(opcodes, filediff_data, interfilediff_data):