code: def in_ipython():
      try:
          if hasattr(__builtins__, "__IPYTHON__"):
              return True
      except NameError:
          pass
      try:
          from IPython import get_ipython
  
          cfg = get_ipython()
          if not (cfg is None) and (
              "IPKernelApp" in get_ipython().config
          ):
              return True
      except ImportError:
          pass
      return False
  
imports: import hashlib
  import json
  import logging
  import os
  import pandas
  import pandas.util
  import platform
  import random
  import string
  import uuid
  import warnings
  from functools import lru_cache
  from typing import Any
  from collections import UserDict
  from .constants import VERBOSE, CACHE_COERCION_SIZE, TRACE
label_desc: Use image node_id 12 for calling a global function with example usage: in_ipython() and returns: False, True, True