code: def isnotebook():
      """check if the code is excuted in the IPython notebook
      Reference: https://stackoverflow.com/a/39662359
      """
      try:
          shell = get_ipython().__class__.__name__
          if shell == "ZMQInteractiveShell":
              return True  # Jupyter notebook or qtconsole
          elif shell == "TerminalInteractiveShell":
              return False  # Terminal running IPython
          else:
              return False  # Other type (?)
      except NameError:
          return False
  
file_path: PARL/parl/utils/utils.py
imports: import os
  import subprocess
  import sys
  import multiprocessing
  import numpy
  from parl.utils import logger
label_desc: Use image node_id 8 for calling a global function with example usage: isnotebook() and returns: True, False, False, False