from typing import Any


def get_response_data(
    message: str, message_type: str, result: Any = None
) -> dict:
    """Return the response data of a given request.

    The value returned is a dictionary intended to be serialized as a JSON
    string and to be sent as the response data of a given request.

    :param message: Message.
    :param message_type: Message type.
    :param result: Result (optional).
    :returns: Response data.
    """
    data = {"message": message, "message_type": message_type}

    if result is not None:
        data["result"] = result

    return data