human
I wrote the below code

    (old_path, old_mode, old_id) = old_file
    (new_path, new_mode, new_id) = new_file
    old_path = patch_filename(old_path, 'a')
    new_path = patch_filename(new_path, 'b')
    def content(mode, hexsha):
        if (hexsha is None):
            return Blob.from_string('')
        elif S_ISGITLINK(mode):
            return Blob.from_string((('Submodule    commit    ' + hexsha) + '\n'))
        else:
            return store[hexsha]
    def lines(content):
        if (not content):
            return []
        else:
            return content.splitlines()
    f.writelines(gen_diff_header((old_path, new_path), (old_mode, new_mode), (old_id, new_id)))
    old_content = content(old_mode, old_id)
    new_content = content(new_mode, new_id)
    if ((not diff_binary) and (is_binary(old_content.data) or is_binary(new_content.data))):
        f.write((((('Binary    files    ' + old_path) + '    and    ') + new_path) + '    differ\n'))
    else:
        f.writelines(unified_diff(lines(old_content), lines(new_content), old_path, new_path))

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

def write_object_diff(f, store, old_file, new_file, diff_binary=False):