code: def refresh_plugin(self):
          
          nb = None
          if self.tabwidget.count():
              client = self.tabwidget.currentWidget()
              nb = client.notebookwidget
              nb.setFocus()
          else:
              nb = None
          self.update_notebook_actions()
docs: Refresh tabwidget.