class_docstr: A thread safe, TTL cache of node provider availability. We don't use
  cachetools.TTLCache because it always sets the expiration time relative to
  insertion time, but in our case, we want entries to expire relative to when
  the node creation was attempted (and entries aren't necessarily added in
  order). We want the entries to expire because the information grows stale
  over time.
class_docstr_tok: ["A","thread","safe",",","TTL","cache","of","node","provider","availability",".","We","do","n't","use","cachetools.TTLCache","because","it","always","sets","the","expiration","time","relative","to","insertion","time",",","but","in","our","case",",","we","want","entries","to","expire","relative","to","when","the","node","creation","was","attempted","(","and","entries","are","n't","necessarily","added","in","order",")",".","We","want","the","entries","to","expire","because","the","information","grows","stale","over","time","."]
docstr: Returns a summary of node availabilities and their staleness.
  
  Returns
      A summary of node availabilities and their staleness.
docstr_tok: ["Returns","a","summary","of","node","availabilities","and","their","staleness",".","Returns","A","summary","of","node","availabilities","and","their","staleness","."]
code: def summary(self) -> NodeAvailabilitySummary:
      """
      Returns a summary of node availabilities and their staleness.
  
      Returns
          A summary of node availabilities and their staleness.
      """
      with self.lock:
          self._remove_old_entries()
          return NodeAvailabilitySummary(
              {
                  node_type: record
                  for node_type, (_, record) in self.store.items()
              }
          )
  
file_path: ray/python/ray/autoscaler/_private/node_provider_availability_tracker.py
imports: import threading
  import time
  from dataclasses import dataclass
  from typing import Callable, Dict, Optional, Tuple
  from ray.autoscaler._private.constants import AUTOSCALER_NODE_AVAILABILITY_MAX_STALENESS_S
  from ray.autoscaler.node_launch_exception import NodeLaunchException
label_desc: Use image node_id 4 for calling the NodeProviderAvailabilityTracker obj's underlying member method code with example usage: obj.summary() and returns: NodeAvailabilitySummary