code: def dispose(self):
      
      self._lock.acquire()
      self._events_writer.Close()
      self._events_writer = None
      self._lock.release()
docs: Disposes of this events writer manager, making it no longer usable.
  
      Call this method when this object is done being used in order to clean up
      resources and handlers. This method should ever only be called once.