def METHOD_NAME(old_index, new_index, suppressed_kinds, context, to):
    for key, old_content in old_index.items():
        if key in new_index:
            new_content = new_index[key]
            if old_content.content == new_content.content:
                continue
            # modified
            to.write("%s has changed:\n" % key)
            print_diff(suppressed_kinds, new_content.kind, context, old_content.content, new_content.content, to)
            to.write("\n")
        else:
            # removed
            to.write("%s has been removed:\n" % key)
            print_diff(suppressed_kinds, old_content.kind, context, old_content.content, b"", to)
            to.write("\n")
    for key, new_content in new_index.items():
        if key in old_index:
            continue
        # added
        to.write("%s has been added:\n" % key)
        print_diff(suppressed_kinds, new_content.kind, context, b"", new_content.content, to)
        to.write("\n")