code: def _get_session(
      executable: "_ExecutableMixin", session: SessionType = None
  ):
      from ...session import get_default_session
  
      # if session is not specified, use default session
      if session is None:
          session = get_default_session()
  
      return session
  
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 for calling a global function with example usage: _get_session(executable, session) and returns: session