class_docstr: Manages the Comm connection between IPython and the browser (client).
  
  Comms are 2 way, with the CommSocket being able to publish a message
  via the send_json method, and handle a message with on_message. On the
  JS side figure.send_message and figure.ws.onmessage do the sending and
  receiving respectively.
code: def send_binary(self, blob):
      # The comm is ascii, so we always send the image in base64
      # encoded data URL form.
      data = b64encode(blob)
      if six.PY3:
          data = data.decode("ascii")
      data_uri = "data:image/png;base64,{0}".format(data)
      self.comm.send({"data": data_uri})
  
imports: import six
  from base64 import b64encode
  import io
  import json
  import os
  import uuid
  from IPython.display import display, Javascript, HTML
  from matplotlib import rcParams, is_interactive
  from matplotlib._pylab_helpers import Gcf
  from matplotlib.backend_bases import _Backend, FigureCanvasBase, NavigationToolbar2
  from matplotlib.backends.backend_webagg_core import FigureCanvasWebAggCore, FigureManagerWebAgg, NavigationToolbar2WebAgg, TimerTornado
label_desc: Use image node_id 5 for calling the CommSocket obj's underlying member method code with example usage: obj.send_binary(blob) without return types