code: def connection_info():
      """
      Return a string showing the figure and connection status for
      the backend. This is intended as a diagnostic tool, and not for general
      use.
  
      """
      result = []
      for manager in Gcf.get_all_fig_managers():
          fig = manager.canvas.figure
          result.append(
              "{0} - {0}".format(
                  (fig.get_label() or "Figure {0}".format(manager.num)),
                  manager.web_sockets,
              )
          )
      if not is_interactive():
          result.append(
              "Figures pending show: {0}".format(len(Gcf._activeQue))
          )
      return "\n".join(result)
  
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 1 for calling a global function with example usage: connection_info() and returns: str