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: Update the availability and details of a single ndoe type.
  
  Args:
    node_type: The node type.
    timestamp: The timestamp that this information is accurate as of.
    node_launch_exception: Details about why the node launch failed. If
      empty, the node type will be considered available.
docstr_tok: ["Update","the","availability","and","details","of","a","single","ndoe","type",".","Args",":","node_type",":","The","node","type",".","timestamp",":","The","timestamp","that","this","information","is","accurate","as","of",".","node_launch_exception",":","Details","about","why","the","node","launch","failed",".","If","empty",",","the","node","type","will","be","considered","available","."]
code: def update_node_availability(
      self,
      node_type: str,
      timestamp: int,
      node_launch_exception: Optional[NodeLaunchException],
  ) -> None:
      """
      Update the availability and details of a single ndoe type.
  
      Args:
        node_type: The node type.
        timestamp: The timestamp that this information is accurate as of.
        node_launch_exception: Details about why the node launch failed. If
          empty, the node type will be considered available."""
      with self.lock:
          self._update_node_availability_requires_lock(
              node_type, timestamp, node_launch_exception
          )
  
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 3 for calling the NodeProviderAvailabilityTracker obj's underlying member method code with example usage: obj.update_node_availability(node_type, timestamp, node_launch_exception) without return types