def METHOD_NAME(self, request, context):
    olds = rpc.deserialize_properties(request.olds, True)
    news = rpc.deserialize_properties(request.news, True)
    if news[PROVIDER_KEY] == rpc.UNKNOWN:
        provider = get_provider(olds)
    else:
        provider = get_provider(news)
    result = provider.diff(request.id, olds, news)  # pylint: disable=no-member
    fields = {}
    if result.changes is not None:
        if result.changes:
            fields[
                "changes"
            ] = proto.DiffResponse.DIFF_SOME  # pylint: disable=no-member
        else:
            fields[
                "changes"
            ] = proto.DiffResponse.DIFF_NONE  # pylint: disable=no-member
    else:
        fields[
            "changes"
        ] = proto.DiffResponse.DIFF_UNKNOWN  # pylint: disable=no-member
    if result.replaces is not None:
        fields["replaces"] = result.replaces
    if result.delete_before_replace is not None:
        fields["deleteBeforeReplace"] = result.delete_before_replace
    return proto.DiffResponse(**fields)