class_docstr: Manager for Comms in the Kernel
class_docstr_tok: ["Manager","for","Comms","in","the","Kernel"]
docstr: Register a callable f for a given target name
  
  f will be called with two arguments when a comm_open message is received with `target`:
  
  - the Comm instance
  - the `comm_open` message itself.
  
  f can be a Python callable or an import string for one.
docstr_tok: ["Register","a","callable","f","for","a","given","target","name","f","will","be","called","with","two","arguments","when","a","comm_open","message","is","received","with","`","target","`",":","-","the","Comm","instance","-","the","`","comm_open","`","message","itself",".","f","can","be","a","Python","callable","or","an","import","string","for","one","."]
code: def register_target(self, target_name, f):
      """Register a callable f for a given target name
  
      f will be called with two arguments when a comm_open message is received with `target`:
  
      - the Comm instance
      - the `comm_open` message itself.
  
      f can be a Python callable or an import string for one.
      """
      if isinstance(f, string_types):
          f = import_item(f)
  
      self.targets[target_name] = f
  
file_path: catboost/contrib/python/ipykernel/py2/ipykernel/comm/manager.py
imports: import sys
  import logging
  from traitlets.config import LoggingConfigurable
  from ipython_genutils.importstring import import_item
  from ipython_genutils.py3compat import string_types
  from traitlets import Instance, Unicode, Dict, Any, default
  from .comm import Comm
label_desc: Use image node_id 1 for calling the CommManager obj's underlying member method code with example usage: obj.register_target(target_name, f) without return types