code: def save_config(self):
          
          for option, value in list(self.explorer.get_options().items()):
              self.set_option(option, value)
          self.set_option('expanded_state',
                          self.explorer.treewidget.get_expanded_state())
          self.set_option('scrollbar_position',
                          self.explorer.treewidget.get_scrollbar_position())
docs: Save configuration: tree widget state