code: 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
      )
      kernel.comm_manager.register_target(
          "jupyter.widget.control", Widget.handle_control_comm_opened
      )
  
file_path: catboost/contrib/python/ipywidgets/py2/ipywidgets/__init__.py
imports: import os
  from IPython import get_ipython
  from ._version import version_info, __version__, __protocol_version__, __jupyter_widgets_controls_version__, __jupyter_widgets_base_version__
  from .widgets import *
  from traitlets import link, dlink
label_desc: Use image node_id 2 for calling a global function with example usage: register_comm_target(kernel) without return types