class_docstr: Class for communicating between a Frontend and a Kernel
  
  Must be subclassed with a publish_msg method implementation which
  sends comm messages through the iopub channel.
class_docstr_tok: ["Class","for","communicating","between","a","Frontend","and","a","Kernel","Must","be","subclassed","with","a","publish_msg","method","implementation","which","sends","comm","messages","through","the","iopub","channel","."]
code: def publish_msg(
      self,
      msg_type: str,  # noqa: ARG002
      data: MaybeDict = None,  # noqa: ARG002
      metadata: MaybeDict = None,  # noqa: ARG002
      buffers: BuffersType = None,  # noqa: ARG002
      **keys: t.Any,  # noqa: ARG002
  ) -> None:
      msg = "publish_msg Comm method is not implemented"
      raise NotImplementedError(msg)
  
imports: from __future__ import annotations
  import contextlib
  import logging
  import typing
  import uuid
  from traitlets.utils.importstring import import_item
  import comm
label_desc: Use image node_id 2 for calling the BaseComm obj's underlying member method code with example usage: obj.publish_msg(msg_type, data, metadata, buffers) without return types