                                                 dtype=val["type"],
                                                 group=val["group"],
                                                 default=val["default"],
                                                 initial_value=self._config.get(section, key),
                                                 choices=val["choices"],
                                                 is_radio=val["gui_radio"],
                                                 rounding=val["rounding"],
                                                 min_max=val["min_max"],
                                                 helptext=val["helptext"])
                  self.tk_vars.setdefault(section, {})[key] = cp_option.tk_var
                  config_dicts.setdefault(section, {})[key] = cp_option
          logger.debug("Formatted Config for GUI: %s", config_dicts)
          return config_dicts
  
 
</s> remove                                                dtype=val["type"],
                                               group=val["group"],
                                               default=val["default"],
 </s> add                                                dtype=val.datatype,
                                               group=val.group,
                                               default=val.default, </s> remove             for key, val in self._config.defaults[section].items():
 </s> add             for key, val in self._config.defaults[section].items.items(): </s> remove                         choices=params["choices"],
                        is_radio=params["gui_radio"],
                        is_multi_option=params["type"] == list,
                        rounding=params["rounding"],
                        min_max=params["min_max"],
                        helptext=params["helptext"])
 </s> add                         choices=params.choices,
                        is_radio=params.gui_radio,
                        is_multi_option=params.datatype == list,
                        rounding=params.rounding,
                        min_max=params.min_max,
                        helptext=params.helptext) </s> remove         self.configfile = self.get_config_file(configfile)
 </s> add         self.configfile = self._get_config_file(configfile) </s> remove     def __init__(self, section, configfile=None):
        """ Init Configuration  """
 </s> add     def __init__(self, section: Optional[str], configfile: Optional[str] = None) -> None:
        """ Init Configuration

        Parameters
        ----------
        section: str or ``None``
            The configuration section. ``None`` for all sections
        configfile: str, optional
            Optional path to a config file. ``None`` for default location. Default: ``None``
        """
                                               choices=val.choices,
                                               is_radio=val.gui_radio,
                                               rounding=val.rounding,
                                               min_max=val.min_max,
                                               helptext=val.helptext)
                                                 dtype=val["type"],
                                                 group=val["group"],
                                                 default=val["default"],
                                                 initial_value=self._config.get(section, key),
                                               choices=val.choices,
                                               is_radio=val.gui_radio,
                                               rounding=val.rounding,
                                               min_max=val.min_max,
                                               helptext=val.helptext)
                                               choices=val.choices,
                                               is_radio=val.gui_radio,
                                               rounding=val.rounding,
                                               min_max=val.min_max,
                                               helptext=val.helptext)
                                               choices=val.choices,
                                               is_radio=val.gui_radio,
                                               rounding=val.rounding,
                                               min_max=val.min_max,
                                               helptext=val.helptext)
                                               choices=val.choices,
                                               is_radio=val.gui_radio,
                                               rounding=val.rounding,
                                               min_max=val.min_max,
                                               helptext=val.helptext)
                                               choices=val.choices,
                                               is_radio=val.gui_radio,
                                               rounding=val.rounding,
                                               min_max=val.min_max,
                                               helptext=val.helptext)
                  self.tk_vars.setdefault(section, {})[key] = cp_option.tk_var
                  config_dicts.setdefault(section, {})[key] = cp_option
          logger.debug("Formatted Config for GUI: %s", config_dicts)
          return config_dicts
  
keep keep keep keep replace replace replace replace 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 
tools/preview/control_panels.py