code: def _detect_isolated_frame() -> bool:
      if not _is_IPython_display():
          return True  # isolated HTML page to show somehow
  
      # Most online notebook platforms are showing cell output in iframe and require
      # a self-contained HTML which includes both:
      # - the script loading JS library and
      # - the script that uses this JS lib to create plot.
  
      # Try to detect the platform.
      try:
          import google.colab
  
          return True  # Colab -> iframe
      except ImportError:
          pass
  
      if os.path.exists("/kaggle/input"):
          return False  # Kaggle -> no iframe
  
      if "AZURE_NOTEBOOKS_HOST" in os.environ:
          return True  # Azure Notebook -> iframe
  
      if "DEEPNOTE_PROJECT_ID" in os.environ:
          return True  # Deepnote Notebook -> iframe
  
      if "databricks" in str(os.environ):
          # Databricks notebook -> iframe
          # As proposed: https://github.com/JetBrains/lets-plot/issues/602
          return True
  
      if "NEXTJOURNAL" in str(os.environ):
          return True  # NextJournal notebook -> iframe
  
      if os.getenv("PLOTLY_RENDERER") == "colab":
          # good enouth - something colab-like
          return True  # Colab -> iframe
  
      # ToDo: other platforms: vscode, nteract, cocalc
  
      try:
          shell = get_ipython().__class__.__name__
          if shell == "ZMQInteractiveShell":
              return False  # Jupyter notebook or qtconsole  -> load JS librarty once per notebook
          elif shell == "TerminalInteractiveShell":
              return True  # Terminal running IPython  -> an isolated HTML page to show somehow
          else:
              return True  # Other type (?)
      except NameError:
          return True
  
file_path: lets-plot/python-package/lets_plot/frontend_context/_html_contexts.py
imports: import os
  from ._frontend_ctx import FrontendContext
  from ._jupyter_notebook_ctx import JupyterNotebookContext
  from ._static_html_page_ctx import StaticHtmlPageContext
  from .._global_settings import has_global_value, get_global_bool, HTML_ISOLATED_FRAME
label_desc: Use image node_id 3 for calling a global function with example usage: _detect_isolated_frame() and returns: True, True, False, True, True, True, True, True, False, True, True, True