code: def AddEventSource(self, event_source):
      
      self._RaiseIfNotWritable()
  
      self._AddAttributeContainer(
          self._CONTAINER_TYPE_EVENT_SOURCE, event_source)
docs: Adds an event source.
  
      Args:
        event_source (EventSource): event source.
  
      Raises:
        IOError: when the storage file is closed or read-only.
        OSError: when the storage file is closed or read-only.