def METHOD_NAME(self) -> None:
    from bascenev1 import DEFAULT_TEAM_COLORS, DEFAULT_TEAM_NAMES
    cfg = bui.app.config
    # First, determine whether the values here are defaults, in which case
    # we can clear any values from prefs.  Currently if the string matches
    # either the default raw value or its translation we consider it
    # default. (the fact that team names get translated makes this
    # situation a bit sloppy)
    new_names: list[str] = []
    is_default = True
    for i in range(2):
        name = cast(str, bui.textwidget(query=self._color_text_fields[i]))
        if not name:
            bui.screenmessage(
                bui.Lstr(resource='nameNotEmptyText'), color=(1, 0, 0)
            )
            bui.getsound('error').play()
            return
        new_names.append(name)
    for i in range(2):
        if self._colors[i] != DEFAULT_TEAM_COLORS[i]:
            is_default = False
        default_team_name = DEFAULT_TEAM_NAMES[i]
        default_team_name_translated = bui.Lstr(
            translate=('teamNames', default_team_name)
        ).evaluate()
        if (
            new_names[i] != default_team_name
            and new_names[i] != default_team_name_translated
        ):
            is_default = False
    if is_default:
        for key in ('Custom Team Names', 'Custom Team Colors'):
            if key in cfg:
                del cfg[key]
    else:
        cfg['Custom Team Names'] = list(new_names)
        cfg['Custom Team Colors'] = list(self._colors)
    cfg.commit()
    self._transition_out()