code: def __init__(self, tileable: TileableType, session: SessionType):
      self._sess_id = id(session)
      key = tileable.key
  
      def cb(_, sess=ref(session)):
          try:
              cur_thread_ident = threading.current_thread().ident
              decref_in_isolation = (
                  get_isolation().thread_ident == cur_thread_ident
              )
          except KeyError:
              # isolation destroyed, no need to decref
              return
  
          fut = _decref_runner.put(key, sess)
          if not decref_in_isolation:
              # if decref in isolation, means that this tileable
              # is not required for main thread, thus we do not need
              # to wait for decref, otherwise, wait a bit
              try:
                  fut.result(0.5)
              except concurrent.futures.TimeoutError:
                  # ignore timeout
                  pass
  
      self.tileable = ref(tileable, cb)
  
imports: import asyncio
  import atexit
  import concurrent.futures
  import queue
  import threading
  from typing import List
  from weakref import WeakKeyDictionary, ref
  from ...lib.aio import get_isolation
  from ...typing import SessionType, TileableType
  from ..mode import enter_mode
label_desc: Use image node_id 1 to create a new _TileableSession object  with example: obj = _TileableSession(tileable, session)