class_docstr: A dictionary that maintains up to :maxsize: key-value-expiration tuples until their expiration_time
class_docstr_tok: ["A","dictionary","that","maintains","up","to",":","maxsize",":","key-value-expiration","tuples","until","their","expiration_time"]
code: def _remove_outdated(self):
      while (
          not self.frozen
          and self.expiration_heap
          and (
              self.expiration_heap[ROOT].expiration_time
              < get_dht_time()
              or len(self.data) > self.maxsize
          )
      ):
          heap_entry = heapq.heappop(self.expiration_heap)
          if self.key_to_heap.get(heap_entry.key) == heap_entry:
              del (
                  self.data[heap_entry.key],
                  self.key_to_heap[heap_entry.key],
              )
  
imports: from __future__ import annotations
  import heapq
  import time
  from contextlib import contextmanager
  from dataclasses import dataclass
  from typing import Dict, Generic, Iterator, List, Optional, Tuple, TypeVar
label_desc: Use image node_id 2 for calling the TimedStorage obj's underlying member method code with example usage: obj._remove_outdated() without return types