code: def get_current_client(self):
          
          try:
              client = self.tabwidget.currentWidget()
          except AttributeError:
              client = None
          if client is not None:
              return client
docs: Return the currently selected notebook.