def swap_window_order(self, new_location: int) -> None:
        """
        Change the order of the current window within the current group.
        """
        if new_location < 0 or new_location > len(self.windows) - 1:
            return

        windows = self.windows
        current_window_index = windows.index(self.current_window)

        windows[current_window_index], windows[new_location] = (
            windows[new_location],
            windows[current_window_index],
        )

        Change the order of the current window within the current group.
        
libqtile/group.py