code: def close(self):
          
          if self.comm is not None:
              Widget.widgets.pop(self.model_id, None)
              self.comm.close()
              self.comm = None
              self._ipython_display_ = None
docs: Close method.
  
          Closes the underlying comm.
          When the comm is closed, all of the widget views are automatically
          removed from the front-end.