code: def test_expiration_after_update(
      tracker: NodeProviderAvailabilityTracker,
  ):
      global cur_time
  
      exc = NodeLaunchException(
          "DontFeelLikeIt", "This seems like a lot of work.", exc_info
      )
      tracker.update_node_availability("my-node-a", 1, exc)
      assert len(tracker.summary().node_availabilities) == 1
  
      cur_time += 60 * 30 - 1
  
      tracker.update_node_availability("my-node-a", cur_time, exc)
      assert len(tracker.summary().node_availabilities) == 1
  
      cur_time += 2
  
      assert len(tracker.summary().node_availabilities) == 1
  
      cur_time += 60 * 30 + 1
      assert len(tracker.summary().node_availabilities) == 0
  
file_path: ray/python/ray/tests/test_node_provider_availability_tracker.py
imports: import datetime
  import dataclasses
  import os
  import sys
  import pytest
  from ray.autoscaler.node_launch_exception import NodeLaunchException
  from ray.autoscaler._private.node_provider_availability_tracker import NodeProviderAvailabilityTracker, NodeAvailabilitySummary, NodeAvailabilityRecord, UnavailableNodeInformation
label_desc: Use image node_id 4 for calling a global function with example usage: test_expiration_after_update(tracker) without return types