class_docstr: Class for communicating between a Frontend and a Kernel
class_docstr_tok: ["Class","for","communicating","between","a","Frontend","and","a","Kernel"]
docstr: Register a callback for comm_msg
  
  Will be called with the `data` of any comm_msg messages.
  
  Call `on_msg(None)` to disable an existing callback.
docstr_tok: ["Register","a","callback","for","comm_msg","Will","be","called","with","the","`","data","`","of","any","comm_msg","messages",".","Call","`","on_msg","(","None",")","`","to","disable","an","existing","callback","."]
code: def on_msg(self, callback):
      """Register a callback for comm_msg
  
      Will be called with the `data` of any comm_msg messages.
  
      Call `on_msg(None)` to disable an existing callback.
      """
      self._msg_callback = callback
  
file_path: catboost/contrib/python/ipykernel/py2/ipykernel/comm/comm.py
imports: import uuid
  from traitlets.config import LoggingConfigurable
  from ipykernel.kernelbase import Kernel
  from ipykernel.jsonutil import json_clean
  from traitlets import Instance, Unicode, Bytes, Bool, Dict, Any, default
label_desc: Use image node_id 11 for calling the Comm obj's underlying member method code with example usage: obj.on_msg(callback) without return types