code: def __init__(
      self,
      load: Callable[[T], Coroutine[None, None, U]],
      lifetime_ns: int,
      num_slots: int,
      cache_name: str,
  ):
      assert lifetime_ns > 0
      assert num_slots > 0
      self.load = load
      self.lifetime_ns = lifetime_ns
      self.num_slots = num_slots
      self.cache_name = cache_name
      self._futures: Dict[T, asyncio.Future] = {}
      self._cache: Dict[T, U] = {}
      self._expiry_time: Dict[T, int] = {}
      self._keys_by_expiry = sortedcontainers.SortedSet(
          key=lambda k: self._expiry_time[k]
      )
      self._shutting_down = False
  
file_path: hail/gear/gear/time_limited_max_size_cache.py
imports: import asyncio
  import time
  from typing import Callable, Coroutine, Dict, Generic, TypeVar
  import prometheus_client
  import sortedcontainers
  from prometheus_async.aio import time
label_desc: Use image node_id 1 to create a new TimeLimitedMaxSizeCache object from inherited base classes: Generic with example: obj = TimeLimitedMaxSizeCache(load, lifetime_ns, num_slots, cache_name)