from typing import Any


def get_ret_wrong_typing_error_message(annotation: type, ret: Any) -> str:
    """
    Builds a message for a wrong return value typing error.

    :param annotation: the type
    :param ret: the return value
    :return: the message
    """
    return "Return value does not match typing:" "%s is not an instance of %s" % (
        repr(ret),
        annotation,
    )