class_docstr: Class for communicating between a Frontend and a Kernel
class_docstr_tok: ["Class","for","communicating","between","a","Frontend","and","a","Kernel"]
code: def __init__(
      self,
      target_name="",
      data=None,
      metadata=None,
      buffers=None,
      **kwargs,
  ):
      if target_name:
          kwargs["target_name"] = target_name
      super(Comm, self).__init__(**kwargs)
      if self.kernel:
          if self.primary:
              # I am primary, open my peer.
              self.open(data=data, metadata=metadata, buffers=buffers)
          else:
              self._closed = False
  
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 4 to create a new Comm object from inherited base classes: LoggingConfigurable with example: obj = Comm(target_name, data, metadata, buffers)