def get_ipython():
 from IPython.core.interactiveshell import InteractiveShell
 if InteractiveShell.initialized():
  return InteractiveShell.instance()

def get_ipython ( ) : from IPython . core . interactiveshell import InteractiveShell if InteractiveShell . initialized ( ) : return InteractiveShell . instance ( )
get the global interactiveshell instance .