def _message_to_string(message, data=None):
    """ Gives a string representation of a PB2 message. """
    if data is None:
        data = _json_from_message(message)

    return "Message {} from {} to {}: {}".format(
        message.namespace, message.source_id, message.destination_id, data)
def _message_to_string ( message , data = None ) : if data is None : data = _json_from_message ( message ) return "Message {} from {} to {}: {}" . format ( message . namespace , message . source_id , message . destination_id , data )
Gives a string representation of a PB2 message.