<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def update_plugin_title(self):
 """Update plugin title, i.e. dockwidget or window title"""

        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())