    def _find_next_widget(self, direction, stay_in_col=False):
        """
        Find the next widget to get the focus, following TAB logic

        :param direction: The direction to move through the widgets.
        :param stay_in_col: Whether to limit search to current column.  (Used for up/down in columns).
        """
        current_widget = self._live_widget
        current_col = self._live_col
        while 0 <= self._live_col < len(self._columns):
            self._live_widget += direction
            while 0 <= self._live_widget < len(self._columns[self._live_col]):
                widget = self._columns[self._live_col][self._live_widget]
                if widget.is_tab_stop and not widget.disabled:
                    return
                self._live_widget += direction

            # No need to do more if we are staying in the column.
            if stay_in_col:
                break

            # If we got here move to the ne t column.
            self._live_col += direction
            self._live_widget = -1 if direction > 0 else len(self._columns[self._live_col])
            if self._live_col == current_col:
                break

        # We've exhausted our search - give up and stay where we were.
        self._live_widget = current_widget
Find the next widget to get the focus, following TAB logic

:param direction: The direction to move through the widgets.
:param stay_in_col: Whether to limit search to current column.  (Used for up/down in columns).
asciimatics/widgets/layout.py