def METHOD_NAME(self):
    self.colors = getattr(self, "colors", None)  # old config
    avail_command = {
        "xkblayout-state": (self._set_xkblayout, self._get_xkblayout),
        "setxkbmap": (self._set_setxkbmap, self._get_setxkbmap),
    }
    self._set_command, self._get_command = avail_command[
        self.py3.check_commands(list(avail_command))
    ]
    if not self.layouts:
        self.layouts = []
    # We use a copy of layouts so that we can add extra layouts without
    # affecting the original list
    self._layouts = self.layouts[:]
    self._last_layout = None
    self.colors_dict = {}
    # old compatibility: set default values
    self.defaults = {
        "fr": "#268BD2",
        "ru": "#F75252",
        "ua": "#FCE94F",
        "us": "#729FCF",
    }