code: def AddEvent(self, event):
      
      self._RaiseIfNotWritable()
  
      self._storage_file.AddEvent(event)
      self.number_of_events += 1
  
      self._UpdateCounters(event)
docs: Adds an event.
  
      Args:
        event (EventObject): an event.
  
      Raises:
        IOError: when the storage writer is closed.
        OSError: when the storage writer is closed.