def _prepare_response_data(message, data=None):
    """Prepare response output.

    Returns a simple dict containing a key `message` and optionally a key `data`.
    """
    output = {"message": message}
    if data is not None:
        output["data"] = data

    return output