code: def is_notebook():
      try:
          # noinspection PyUnresolvedReferences
          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: jiant/jiant/utils/display.py
imports: import json
  from tqdm import auto
label_desc: Use image node_id 6 for calling a global function with example usage: is_notebook() and returns: True, False, False, False