human
I wrote the below code

    def get_lines_diff(diff):
        count = 0
        for line in diff:
            if ((line.startswith('+') and (not line.startswith('+++'))) or (line.startswith('-') and (not line.startswith('---')))):
                count += 1
        return count
    if (not filecmp.cmp(file1, file2)):
        files_differ = False
        if (attributes is None):
            attributes = {}
        decompress = attributes.get('decompress', None)
        if (not decompress):
            local_file = open(file1, 'U').readlines()
            history_data = open(file2, 'U').readlines()
        else:
            local_file = get_fileobj(file1, 'U').readlines()
            history_data = get_fileobj(file2, 'U').readlines()
        if attributes.get('sort', False):
            history_data.sort()
        if (len(local_file) == len(history_data)):
            for i in range(len(history_data)):
                if (local_file[i].rstrip('\r\n') != history_data[i].rstrip('\r\n')):
                    files_differ = True
                    break
        else:
            files_differ = True
        if files_differ:
            allowed_diff_count = int(attributes.get('lines_diff', 0))
            diff = list(difflib.unified_diff(local_file, history_data, 'local_file', 'history_data'))
            diff_lines = get_lines_diff(diff)
            if (diff_lines > allowed_diff_count):
                if ('GALAXY_TEST_RAW_DIFF' in os.environ):
                    diff_slice = diff
                elif (len(diff) < 60):
                    diff_slice = diff[0:40]
                else:
                    diff_slice = ((diff[:25] + ['********\n', '*SNIP    *\n', '********\n']) + diff[(-25):])
                if (file1.endswith('.pdf') or file2.endswith('.pdf')):
                    valid_diff_strs = ['description', 'createdate', 'creationdate', 'moddate', 'id', 'producer', 'creator']
                    valid_diff = False
                    invalid_diff_lines = 0
                    for line in diff_slice:
                        line =...

What's a good function header?

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

def files_diff(file1, file2, attributes=None):