          if datatype in (float, int) and (rounding is None or min_max is None):
              raise ValueError("'rounding' and 'min_max' must be set for numerical options")
          if isinstance(datatype, list) and not choices:
              raise ValueError("'choices' must be defined for list based configuration items")
          if not isinstance(choices, (list, tuple)):
              raise ValueError("'choices' must be a list or tuple")
  
          info = self.expand_helptext(info, choices, default, datatype, min_max, fixed)
          self.defaults[section][title] = {"default": default,
                                           "helptext": info,
                                           "type": datatype,
                                           "rounding": rounding,
                                           "min_max": min_max,
                                           "choices": choices,
                                           "gui_radio": gui_radio,
                                           "fixed": fixed,
                                           "group": group}
  
      @staticmethod
      def expand_helptext(helptext, choices, default, datatype, min_max, fixed):
          """ Add extra helptext info from parameters """
          helptext += "\n"
          if not fixed:
              helptext += "\nThis option can be updated for existing models.\n"
          if datatype == list:
 
</s> remove             raise ValueError("Section does not exist: {}".format(section))
        if datatype not in (str, bool, float, int, list):
            raise ValueError("'datatype' must be one of str, bool, float or "
                             "int: {} - {}".format(section, title))
 </s> add             raise ValueError(f"Section does not exist: {section}")
        assert datatype in (str, bool, float, int, list), (
            f"'datatype' must be one of str, bool, float or int: {section} - {title}") </s> remove         choices = list() if not choices else choices
 </s> add         choices = [] if not choices else choices </s> remove         if None in (section, title, default, info):
            raise ValueError("Default config items must have a section, title, defult and "
                             "information text")
 </s> add         assert (section is not None and
                title is not None and
                default is not None and
                info is not None), ("Default config items must have a section, title, defult and "
                                    "information text") </s> remove         if choices:
            helptext += "\nChoose from: {}".format(choices)
 </s> add         if choices and choices != "colorchooser":
            helptext += f"\nChoose from: {choices}"
        if choices != "colorchooser" and not isinstance(choices, (list, tuple)):
            raise ValueError("'choices' must be a list or tuple or 'colorchooser")

        info = self._expand_helptext(info, choices, default, datatype, min_max, fixed)
        self.defaults[section].items[title] = ConfigItem(default=default,
                                                         helptext=info,
                                                         datatype=datatype,
                                                         rounding=rounding or 0,
                                                         min_max=min_max,
                                                         choices=choices,
                                                         gui_radio=gui_radio,
                                                         fixed=fixed,
                                                         group=group)

    @classmethod
    def _expand_helptext(cls,
                         helptext: str,
                         choices: Union[str, List[str]],
                         default: ConfigValueType,
                         datatype: type,
                         min_max: Optional[Union[Tuple[int, int], Tuple[float, float]]],
                         fixed: bool) -> str:
          if datatype in (float, int) and (rounding is None or min_max is None):
              raise ValueError("'rounding' and 'min_max' must be set for numerical options")
          if isinstance(datatype, list) and not choices:
              raise ValueError("'choices' must be defined for list based configuration items")
        if choices != "colorchooser" and not isinstance(choices, (list, tuple)):
            raise ValueError("'choices' must be a list or tuple or 'colorchooser")

        info = self._expand_helptext(info, choices, default, datatype, min_max, fixed)
        self.defaults[section].items[title] = ConfigItem(default=default,
                                                         helptext=info,
                                                         datatype=datatype,
                                                         rounding=rounding or 0,
                                                         min_max=min_max,
                                                         choices=choices,
                                                         gui_radio=gui_radio,
                                                         fixed=fixed,
                                                         group=group)

    @classmethod
    def _expand_helptext(cls,
                         helptext: str,
                         choices: Union[str, List[str]],
                         default: ConfigValueType,
                         datatype: type,
                         min_max: Optional[Union[Tuple[int, int], Tuple[float, float]]],
                         fixed: bool) -> str:
        if choices != "colorchooser" and not isinstance(choices, (list, tuple)):
            raise ValueError("'choices' must be a list or tuple or 'colorchooser")

        info = self._expand_helptext(info, choices, default, datatype, min_max, fixed)
        self.defaults[section].items[title] = ConfigItem(default=default,
                                                         helptext=info,
                                                         datatype=datatype,
                                                         rounding=rounding or 0,
                                                         min_max=min_max,
                                                         choices=choices,
                                                         gui_radio=gui_radio,
                                                         fixed=fixed,
                                                         group=group)

    @classmethod
    def _expand_helptext(cls,
                         helptext: str,
                         choices: Union[str, List[str]],
                         default: ConfigValueType,
                         datatype: type,
                         min_max: Optional[Union[Tuple[int, int], Tuple[float, float]]],
                         fixed: bool) -> str:
        if choices != "colorchooser" and not isinstance(choices, (list, tuple)):
            raise ValueError("'choices' must be a list or tuple or 'colorchooser")

        info = self._expand_helptext(info, choices, default, datatype, min_max, fixed)
        self.defaults[section].items[title] = ConfigItem(default=default,
                                                         helptext=info,
                                                         datatype=datatype,
                                                         rounding=rounding or 0,
                                                         min_max=min_max,
                                                         choices=choices,
                                                         gui_radio=gui_radio,
                                                         fixed=fixed,
                                                         group=group)

    @classmethod
    def _expand_helptext(cls,
                         helptext: str,
                         choices: Union[str, List[str]],
                         default: ConfigValueType,
                         datatype: type,
                         min_max: Optional[Union[Tuple[int, int], Tuple[float, float]]],
                         fixed: bool) -> str:
        if choices != "colorchooser" and not isinstance(choices, (list, tuple)):
            raise ValueError("'choices' must be a list or tuple or 'colorchooser")

        info = self._expand_helptext(info, choices, default, datatype, min_max, fixed)
        self.defaults[section].items[title] = ConfigItem(default=default,
                                                         helptext=info,
                                                         datatype=datatype,
                                                         rounding=rounding or 0,
                                                         min_max=min_max,
                                                         choices=choices,
                                                         gui_radio=gui_radio,
                                                         fixed=fixed,
                                                         group=group)

    @classmethod
    def _expand_helptext(cls,
                         helptext: str,
                         choices: Union[str, List[str]],
                         default: ConfigValueType,
                         datatype: type,
                         min_max: Optional[Union[Tuple[int, int], Tuple[float, float]]],
                         fixed: bool) -> str:
        if choices != "colorchooser" and not isinstance(choices, (list, tuple)):
            raise ValueError("'choices' must be a list or tuple or 'colorchooser")

        info = self._expand_helptext(info, choices, default, datatype, min_max, fixed)
        self.defaults[section].items[title] = ConfigItem(default=default,
                                                         helptext=info,
                                                         datatype=datatype,
                                                         rounding=rounding or 0,
                                                         min_max=min_max,
                                                         choices=choices,
                                                         gui_radio=gui_radio,
                                                         fixed=fixed,
                                                         group=group)

    @classmethod
    def _expand_helptext(cls,
                         helptext: str,
                         choices: Union[str, List[str]],
                         default: ConfigValueType,
                         datatype: type,
                         min_max: Optional[Union[Tuple[int, int], Tuple[float, float]]],
                         fixed: bool) -> str:
        if choices != "colorchooser" and not isinstance(choices, (list, tuple)):
            raise ValueError("'choices' must be a list or tuple or 'colorchooser")

        info = self._expand_helptext(info, choices, default, datatype, min_max, fixed)
        self.defaults[section].items[title] = ConfigItem(default=default,
                                                         helptext=info,
                                                         datatype=datatype,
                                                         rounding=rounding or 0,
                                                         min_max=min_max,
                                                         choices=choices,
                                                         gui_radio=gui_radio,
                                                         fixed=fixed,
                                                         group=group)

    @classmethod
    def _expand_helptext(cls,
                         helptext: str,
                         choices: Union[str, List[str]],
                         default: ConfigValueType,
                         datatype: type,
                         min_max: Optional[Union[Tuple[int, int], Tuple[float, float]]],
                         fixed: bool) -> str:
        if choices != "colorchooser" and not isinstance(choices, (list, tuple)):
            raise ValueError("'choices' must be a list or tuple or 'colorchooser")

        info = self._expand_helptext(info, choices, default, datatype, min_max, fixed)
        self.defaults[section].items[title] = ConfigItem(default=default,
                                                         helptext=info,
                                                         datatype=datatype,
                                                         rounding=rounding or 0,
                                                         min_max=min_max,
                                                         choices=choices,
                                                         gui_radio=gui_radio,
                                                         fixed=fixed,
                                                         group=group)

    @classmethod
    def _expand_helptext(cls,
                         helptext: str,
                         choices: Union[str, List[str]],
                         default: ConfigValueType,
                         datatype: type,
                         min_max: Optional[Union[Tuple[int, int], Tuple[float, float]]],
                         fixed: bool) -> str:
        if choices != "colorchooser" and not isinstance(choices, (list, tuple)):
            raise ValueError("'choices' must be a list or tuple or 'colorchooser")

        info = self._expand_helptext(info, choices, default, datatype, min_max, fixed)
        self.defaults[section].items[title] = ConfigItem(default=default,
                                                         helptext=info,
                                                         datatype=datatype,
                                                         rounding=rounding or 0,
                                                         min_max=min_max,
                                                         choices=choices,
                                                         gui_radio=gui_radio,
                                                         fixed=fixed,
                                                         group=group)

    @classmethod
    def _expand_helptext(cls,
                         helptext: str,
                         choices: Union[str, List[str]],
                         default: ConfigValueType,
                         datatype: type,
                         min_max: Optional[Union[Tuple[int, int], Tuple[float, float]]],
                         fixed: bool) -> str:
        if choices != "colorchooser" and not isinstance(choices, (list, tuple)):
            raise ValueError("'choices' must be a list or tuple or 'colorchooser")

        info = self._expand_helptext(info, choices, default, datatype, min_max, fixed)
        self.defaults[section].items[title] = ConfigItem(default=default,
                                                         helptext=info,
                                                         datatype=datatype,
                                                         rounding=rounding or 0,
                                                         min_max=min_max,
                                                         choices=choices,
                                                         gui_radio=gui_radio,
                                                         fixed=fixed,
                                                         group=group)

    @classmethod
    def _expand_helptext(cls,
                         helptext: str,
                         choices: Union[str, List[str]],
                         default: ConfigValueType,
                         datatype: type,
                         min_max: Optional[Union[Tuple[int, int], Tuple[float, float]]],
                         fixed: bool) -> str:
        if choices != "colorchooser" and not isinstance(choices, (list, tuple)):
            raise ValueError("'choices' must be a list or tuple or 'colorchooser")

        info = self._expand_helptext(info, choices, default, datatype, min_max, fixed)
        self.defaults[section].items[title] = ConfigItem(default=default,
                                                         helptext=info,
                                                         datatype=datatype,
                                                         rounding=rounding or 0,
                                                         min_max=min_max,
                                                         choices=choices,
                                                         gui_radio=gui_radio,
                                                         fixed=fixed,
                                                         group=group)

    @classmethod
    def _expand_helptext(cls,
                         helptext: str,
                         choices: Union[str, List[str]],
                         default: ConfigValueType,
                         datatype: type,
                         min_max: Optional[Union[Tuple[int, int], Tuple[float, float]]],
                         fixed: bool) -> str:
        if choices != "colorchooser" and not isinstance(choices, (list, tuple)):
            raise ValueError("'choices' must be a list or tuple or 'colorchooser")

        info = self._expand_helptext(info, choices, default, datatype, min_max, fixed)
        self.defaults[section].items[title] = ConfigItem(default=default,
                                                         helptext=info,
                                                         datatype=datatype,
                                                         rounding=rounding or 0,
                                                         min_max=min_max,
                                                         choices=choices,
                                                         gui_radio=gui_radio,
                                                         fixed=fixed,
                                                         group=group)

    @classmethod
    def _expand_helptext(cls,
                         helptext: str,
                         choices: Union[str, List[str]],
                         default: ConfigValueType,
                         datatype: type,
                         min_max: Optional[Union[Tuple[int, int], Tuple[float, float]]],
                         fixed: bool) -> str:
        if choices != "colorchooser" and not isinstance(choices, (list, tuple)):
            raise ValueError("'choices' must be a list or tuple or 'colorchooser")

        info = self._expand_helptext(info, choices, default, datatype, min_max, fixed)
        self.defaults[section].items[title] = ConfigItem(default=default,
                                                         helptext=info,
                                                         datatype=datatype,
                                                         rounding=rounding or 0,
                                                         min_max=min_max,
                                                         choices=choices,
                                                         gui_radio=gui_radio,
                                                         fixed=fixed,
                                                         group=group)

    @classmethod
    def _expand_helptext(cls,
                         helptext: str,
                         choices: Union[str, List[str]],
                         default: ConfigValueType,
                         datatype: type,
                         min_max: Optional[Union[Tuple[int, int], Tuple[float, float]]],
                         fixed: bool) -> str:
        if choices != "colorchooser" and not isinstance(choices, (list, tuple)):
            raise ValueError("'choices' must be a list or tuple or 'colorchooser")

        info = self._expand_helptext(info, choices, default, datatype, min_max, fixed)
        self.defaults[section].items[title] = ConfigItem(default=default,
                                                         helptext=info,
                                                         datatype=datatype,
                                                         rounding=rounding or 0,
                                                         min_max=min_max,
                                                         choices=choices,
                                                         gui_radio=gui_radio,
                                                         fixed=fixed,
                                                         group=group)

    @classmethod
    def _expand_helptext(cls,
                         helptext: str,
                         choices: Union[str, List[str]],
                         default: ConfigValueType,
                         datatype: type,
                         min_max: Optional[Union[Tuple[int, int], Tuple[float, float]]],
                         fixed: bool) -> str:
        if choices != "colorchooser" and not isinstance(choices, (list, tuple)):
            raise ValueError("'choices' must be a list or tuple or 'colorchooser")

        info = self._expand_helptext(info, choices, default, datatype, min_max, fixed)
        self.defaults[section].items[title] = ConfigItem(default=default,
                                                         helptext=info,
                                                         datatype=datatype,
                                                         rounding=rounding or 0,
                                                         min_max=min_max,
                                                         choices=choices,
                                                         gui_radio=gui_radio,
                                                         fixed=fixed,
                                                         group=group)

    @classmethod
    def _expand_helptext(cls,
                         helptext: str,
                         choices: Union[str, List[str]],
                         default: ConfigValueType,
                         datatype: type,
                         min_max: Optional[Union[Tuple[int, int], Tuple[float, float]]],
                         fixed: bool) -> str:
        if choices != "colorchooser" and not isinstance(choices, (list, tuple)):
            raise ValueError("'choices' must be a list or tuple or 'colorchooser")

        info = self._expand_helptext(info, choices, default, datatype, min_max, fixed)
        self.defaults[section].items[title] = ConfigItem(default=default,
                                                         helptext=info,
                                                         datatype=datatype,
                                                         rounding=rounding or 0,
                                                         min_max=min_max,
                                                         choices=choices,
                                                         gui_radio=gui_radio,
                                                         fixed=fixed,
                                                         group=group)

    @classmethod
    def _expand_helptext(cls,
                         helptext: str,
                         choices: Union[str, List[str]],
                         default: ConfigValueType,
                         datatype: type,
                         min_max: Optional[Union[Tuple[int, int], Tuple[float, float]]],
                         fixed: bool) -> str:
        if choices != "colorchooser" and not isinstance(choices, (list, tuple)):
            raise ValueError("'choices' must be a list or tuple or 'colorchooser")

        info = self._expand_helptext(info, choices, default, datatype, min_max, fixed)
        self.defaults[section].items[title] = ConfigItem(default=default,
                                                         helptext=info,
                                                         datatype=datatype,
                                                         rounding=rounding or 0,
                                                         min_max=min_max,
                                                         choices=choices,
                                                         gui_radio=gui_radio,
                                                         fixed=fixed,
                                                         group=group)

    @classmethod
    def _expand_helptext(cls,
                         helptext: str,
                         choices: Union[str, List[str]],
                         default: ConfigValueType,
                         datatype: type,
                         min_max: Optional[Union[Tuple[int, int], Tuple[float, float]]],
                         fixed: bool) -> str:
          """ Add extra helptext info from parameters """
          helptext += "\n"
          if not fixed:
              helptext += "\nThis option can be updated for existing models.\n"
          if datatype == list:
keep keep keep keep replace replace replace replace replace replace replace replace replace replace replace 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 
lib/config.py