docstr: Clear up any closed Comms.
docstr_tok: ["Clear","up","any","closed","Comms","."]
code: def clearup_closed(self):
      """Clear up any closed Comms."""
      self.web_sockets = set(
          [socket for socket in self.web_sockets if socket.is_open()]
      )
  
      if len(self.web_sockets) == 0:
          self.canvas.close_event()
  
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 9 for calling the FigureManagerNbAgg obj's underlying member method code with example usage: obj.clearup_closed() without return types