def register_comm_target(kernel=None):
    """Register the jupyter.widget comm target"""
    if kernel is None:
        kernel = get_ipython().kernel
    kernel.comm_manager.register_target('jupyter.widget', Widget.handle_comm_opened)
def register_comm_target ( kernel = None ) : if kernel is None : kernel = get_ipython ( ) . kernel kernel . comm_manager . register_target ( 'jupyter.widget' , Widget . handle_comm_opened )
Register the jupyter.widget comm target