code: def switch_focus(self, layout, column, widget):
          
          # Find the layout to own the focus.
          for i, l in enumerate(self._layouts):
              if l is layout:
                  break
          else:
              # No matching layout - give up now
              return
  
          self._layouts[self._focus].blur()
          self._focus = i
          self._layouts[self._focus].focus(force_column=column,
                                           force_widget=widget)
docs: Switch focus to the specified widget.
  
          :param layout: The layout that owns the widget.
          :param column: The column the widget is in.
          :param widget: The index of the widget to take the focus.