code: def in_ipnb():
      """
      check if we're inside an IPython Notebook
  
      .. deprecated:: 0.14.1
         This is no longer needed, or working, in IPython 3 and above.
      """
      try:
          ip = get_ipython()  # noqa
          front_end = ip.config.get("KernelApp", {}).get(
              "parent_appname", ""
          ) or ip.config.get("IPKernelApp", {}).get(
              "parent_appname", ""
          )
          if "notebook" in front_end.lower():
              return True
      except NameError:
          return False
      return False
  
file_path: catboost/contrib/python/pandas/py2/pandas/io/formats/console.py
imports: import locale
  import sys
  from pandas.io.formats.terminal import get_terminal_size
label_desc: Use image node_id 5 for calling a global function with example usage: in_ipnb() and returns: False, True, False