def apply(self, qtile):
        """
        Rearrange the windows in the specified Qtile object according to this
        QtileState.
        """
        for (group, layout) in self.groups:
            try:
                qtile.groupMap[group].layout = layout
            except KeyError:
                qtile.addGroup(group, layout)

        for (screen, group) in self.screens.items():
            try:
                group = qtile.groupMap[group]
                qtile.screens[screen].setGroup(group)
            except (KeyError, __HOLE__):
                pass  # group or screen missing

        qtile.toScreen(self.current_screen)
dataset/ETHPy150Open qtile/qtile/libqtile/state.py/QtileState.apply