code: def rename_client_tab(self, client, given_name):
          
          index = self.get_client_index_from_id(id(client))
  
          if given_name is not None:
              client.given_name = given_name
          self.tabwidget.setTabText(index, client.get_name())
docs: Rename client's tab