class_docstr: Utility that aggregates related log messages to reduce log spam.
code: def __init__(self):
      self.events_by_key: Dict[str, int] = {}
      # Messages to send in next summary batch.
      self.messages_to_send: List[str] = []
      # Tracks TTL of messages. A message will not be re-sent once it is
      # added here, until its TTL expires.
      self.throttled_messages: Dict[str, float] = {}
  
      # Event summarizer is used by the main thread and
      # by node launcher child threads.
      self.lock = RLock()
  
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 1 to create a new EventSummarizer object  with example: obj = EventSummarizer()