code: def asdict_with_event(self):
      
      event = threading.Event()
      with self._lock:
        self._update_events.add(event)
      return self._asdict(), event
docs: Get a dict representation of this object and an update event.
  
      Returns:
        state: Dict representation of this object.
        update_event: An event that is guaranteed to be set if an update has been
            triggered since the returned dict was generated.