                                          opt_value,
                                          opt,
                                          new_config)
          self.config = new_config
          self.config.optionxform = str
          self.save_config()
          logger.debug("Updated config")
  
      def check_config_choices(self):
          """ Check that config items are valid choices """
 
</s> remove                     opt_value = self.config[section].get(item, opt["default"])
                self.insert_config_item(section,
                                        item,
                                        opt_value,
                                        opt,
                                        new_config)
 </s> add                     opt_value = self.config[section_name].get(item, str(opt.default))
                self._insert_config_item(section_name,
                                         item,
                                         opt_value,
                                         opt,
                                         new_config) </s> remove     def check_config_choices(self):
 </s> add     def _check_config_choices(self) -> None: </s> remove         for section, items in self.defaults.items():
            for item, opt in items.items():
                if item == "helptext" or not opt["choices"]:
 </s> add         for section_name, section in self.defaults.items():
            for item, opt in section.items.items():
                if not opt.choices: </s> remove     def add_new_config_items(self):
 </s> add     def _add_new_config_items(self) -> None: </s> remove         for section, items in self.defaults.items():
            self.insert_config_section(section, items["helptext"], new_config)
            for item, opt in items.items():
                if item == "helptext":
                    continue
                if section not in self.config.sections():
                    logger.debug("Adding new config section: '%s'", section)
                    opt_value = opt["default"]
 </s> add         for section_name, section in self.defaults.items():
            self.insert_config_section(section_name, section.helptext, new_config)
            for item, opt in section.items.items():
                if section_name not in self.config.sections():
                    logger.debug("Adding new config section: '%s'", section_name)
                    opt_value = opt.default
        self.config.optionxform = str  # type:ignore
                                          opt_value,
                                          opt,
                                          new_config)
          self.config = new_config
        self.config.optionxform = str  # type:ignore
          self.save_config()
          logger.debug("Updated config")
  
      def check_config_choices(self):
          """ Check that config items are valid choices """
keep keep keep keep replace keep keep keep keep keep
 Preview - Allow mask color/opacity configuration
  - typing: lib.config
  - docs: lib.config
  - bugfix: popup_configure - keep assets on top 
lib/config.py