code: def update_plugin_title(self):
          
          if self.dockwidget is not None:
              win = self.dockwidget
          elif self.undocked_window is not None:
              win = self.undocked_window
          else:
              return
          win.setWindowTitle(self.get_plugin_title())
docs: Update plugin title, i.e. dockwidget or window title