class_docstr: Interact with dash apps inside jupyter notebooks.
class_docstr_tok: ["Interact","with","dash","apps","inside","jupyter","notebooks","."]
code: def __init__(self):
      self.in_ipython = get_ipython() is not None
      self.in_colab = "google.colab" in sys.modules
  
      if _dep_installed and self.in_ipython and _dash_comm:
  
          @_dash_comm.on_msg
          def _receive_message(msg):
              prev_parent = _caller.get("parent")
              if (
                  prev_parent
                  and prev_parent != _dash_comm.kernel.get_parent()
              ):
                  _dash_comm.kernel.set_parent(
                      [prev_parent["header"]["session"]], prev_parent
                  )
                  del _caller["parent"]
  
              msg_data = msg.get("content").get("data")
              msg_type = msg_data.get("type", None)
              if msg_type == "base_url_response":
                  _jupyter_config.update(msg_data)
  
imports: import asyncio
  import io
  import inspect
  import logging
  import os
  import queue
  import uuid
  import sys
  import threading
  import time
  import traceback
  from typing_extensions import Literal
  from werkzeug.serving import make_server
label_desc: Use image node_id 2 to create a new JupyterDash object  with example: obj = JupyterDash()