code: def register_plugin(self):
          
          self.main.restore_scrollbar_position.connect(
                                                 self.restore_scrollbar_position)
          self.main.add_dockwidget(self)
docs: Register plugin in Spyder's main window