def horizontal_traversal(self, direction):
        """
        Internal method for determining left or right client.
        Negative direction is to left
        """
        column, row = self.column, self.row
        column = (column + direction) % len(self.get_row(row))
        self.clients.current_index = row * self.columns + column
        self.group.focus(self.clients.current_client)

        Internal method for determining left or right client.
        Negative direction is to left
        
libqtile/layout/matrix.py