def prepare_stop_stream_response(stop_stream_response: dict) ->dict:
    """
    Prepares an API response to be returned to the client based on the result of
    stop_stream.
    :param stop_stream_response: the result of stop_stream
    :return: a serialized string suitable for passing to the client
    """
    serialized_stream = {}
    serialized_stream['id'] = stop_stream_response['stream'].id
    serialized_stream['name'] = stop_stream_response['stream'].name
    serialized_stream['start_date'] = stop_stream_response['stream'].start_date
    serialized_stream['stop_date'] = stop_stream_response['stream'].stop_date
    return {'stream': serialized_stream}
