code: def __getitem__(self, item):
      if item == 0:
          return self.value
      elif item == 1:
          return self.expiration_time
      else:
          return getattr(self, item)
  
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 ValueWithExpiration obj's underlying member method code with example usage: obj.__getitem__(item) and returns: self, self, getattr