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","."]
docstr: Close the frontend-side version of this comm
docstr_tok: ["Close","the","frontend-side","version","of","this","comm"]
code: def close(
      self,
      data: MaybeDict = None,
      metadata: MaybeDict = None,
      buffers: BuffersType = None,
      deleting: bool = False,
  ) -> None:
      """Close the frontend-side version of this comm"""
      if self._closed:
          # only close once
          return
      self._closed = True
      if data is None:
          data = self._close_data
      self.publish_msg(
          "comm_close",
          data=data,
          metadata=metadata,
          buffers=buffers,
      )
      if not deleting:
          # If deleting, the comm can't be registered
          comm.get_comm_manager().unregister_comm(self)
  
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 5 for calling the BaseComm obj's underlying member method code with example usage: obj.close(data, metadata, buffers, deleting) without return types