class_docstr: Utility that aggregates related log messages to reduce log spam.
docstr: Clear the events added.
docstr_tok: ["Clear","the","events","added","."]
code: def clear(self) -> None:
      """Clear the events added."""
      with self.lock:
          self.events_by_key.clear()
          self.messages_to_send.clear()
          # Expire any messages that have reached their TTL. This allows them
          # to be sent again.
          for k, t in list(self.throttled_messages.items()):
              if time.time() > t:
                  del self.throttled_messages[k]
  
file_path: ray/python/ray/autoscaler/_private/event_summarizer.py
imports: import time
  from threading import RLock
  from typing import Any, Callable, Dict, List
label_desc: Use image node_id 5 for calling the EventSummarizer obj's underlying member method code with example usage: obj.clear() without return types