code: def is_in_ipython():
      "Is the code running in the ipython environment (jupyter including)"
  
      program_name = os.path.basename(os.getenv("_", ""))
  
      if (
          "jupyter-notebook" in program_name
          or "ipython" in program_name  # jupyter-notebook
          or "JPY_PARENT_PID" in os.environ  # ipython
      ):  # ipython-notebook
          return True
      else:
          return False
  
file_path: ipyexperiments/ipyexperiments/utils/ipython.py
imports: import functools
  import os
  import sys
  import traceback
label_desc: Use image node_id 1 for calling a global function with example usage: is_in_ipython() and returns: True, False