code: def shell():
      
      ctx = _get_shell_ctx()
      try:
          import IPython
          IPython.embed(header=_get_shell_banner(), user_ns=ctx)
      except ImportError:
          import code
          code.interact(banner=_get_shell_banner(verbose=True), local=ctx)
docs: Runs a shell in the app context. If ``IPython`` is installed, it will
      be used, otherwise the default Python shell is used.