code: def in_interactive_session() -> bool:
      """
      Check if we're running in an interactive shell.
  
      Returns
      -------
      bool
          True if running under python/ipython interactive shell.
      """
      from pandas import get_option
  
      def check_main():
          try:
              import __main__ as main
          except ModuleNotFoundError:
              return get_option("mode.sim_interactive")
          return not hasattr(main, "__file__") or get_option(
              "mode.sim_interactive"
          )
  
      try:
          # error: Name '__IPYTHON__' is not defined
          return __IPYTHON__ or check_main()  # type: ignore[name-defined]
      except NameError:
          return check_main()
  
imports: from __future__ import annotations
  from shutil import get_terminal_size
label_desc: Use image node_id 2 for calling a global function with example usage: in_interactive_session() and returns: unknown, unknown, check_main, get_option