code: def WriteEvent(self, event):
      
      self.WriteEventStart()
  
      try:
        self.WriteEventBody(event)
  
      except errors.NoFormatterFound as exception:
        error_message = 'unable to retrieve formatter with error: {0!s}'.format(
            exception)
        self._ReportEventError(event, error_message)
  
      except errors.WrongFormatter as exception:
        error_message = 'wrong formatter with error: {0!s}'.format(exception)
        self._ReportEventError(event, error_message)
  
      self.WriteEventEnd()
docs: Writes the event to the output.
  
      Args:
        event (EventObject): event.