parameters: (self, event)
return_statement: return ensure_bytes(
              json.dumps(event_dict, separators=(',', ':')))
docstring: Serializes a monitor event to the CSM format
  
          :type event: BaseMonitorEvent
          :param event: The event to serialize to bytes
  
          :rtype: bytes
          :returns: The CSM serialized form of the event
docstring_summary: Serializes a monitor event to the CSM format
docstring_tokens: Serializes a monitor event to the CSM format
function: def serialize(self, event):
          """Serializes a monitor event to the CSM format
  
          :type event: BaseMonitorEvent
          :param event: The event to serialize to bytes
  
          :rtype: bytes
          :returns: The CSM serialized form of the event
          """
          event_dict = self._get_base_event_dict(event)
          event_type = self._get_event_type(event)
          event_dict['Type'] = event_type
          for attr in self._SERIALIZEABLE_EVENT_PROPERTIES:
              value = getattr(event, attr, None)
              if value is not None:
                  getattr(self, '_serialize_' + attr)(
                      value, event_dict, event_type=event_type)
          return ensure_bytes(
              json.dumps(event_dict, separators=(',', ':')))
function_tokens: def serialize ( self , event ) : event_dict = self . _get_base_event_dict ( event ) event_type = self . _get_event_type ( event ) event_dict [ 'Type' ] = event_type for attr in self . _SERIALIZEABLE_EVENT_PROPERTIES : value = getattr ( event , attr , None ) if value is not None : getattr ( self , '_serialize_' + attr ) ( value , event_dict , event_type = event_type ) return ensure_bytes ( json . dumps ( event_dict , separators = ( ',' , ':' ) ) )