class_docstr: The layout for a prompt_toolkit
  :class:`~prompt_toolkit.application.Application`.
  This also keeps track of which user control is focused.
  
  :param container: The "root" container for the layout.
  :param focused_element: element to be focused initially. (Can be anything
      the `focus` function accepts.)
class_docstr_tok: ["The","layout","for","a","prompt_toolkit",":","class",":","`","~prompt_toolkit.application.Application","`",".","This","also","keeps","track","of","which","user","control","is","focused",".",":","param","container",":","The","``","root","''","container","for","the","layout",".",":","param","focused_element",":","element","to","be","focused","initially",".","(","Can","be","anything","the","`","focus","`","function","accepts",".",")"]
docstr: Focus the previous visible/focusable Window.
docstr_tok: ["Focus","the","previous","visible\/focusable","Window","."]
code: def focus_previous(self) -> None:
      """
      Focus the previous visible/focusable Window.
      """
      windows = self.get_visible_focusable_windows()
  
      if len(windows) > 0:
          try:
              index = windows.index(self.current_window)
          except ValueError:
              index = 0
          else:
              index = (index - 1) % len(windows)
  
          self.focus(windows[index])
  
imports: from __future__ import annotations
  from typing import Generator, Iterable, Union
  from prompt_toolkit.buffer import Buffer
  from .containers import AnyContainer, ConditionalContainer, Container, Window, to_container
  from .controls import BufferControl, SearchBufferControl, UIControl
label_desc: Use image node_id 21 for calling the Layout obj's underlying member method code with example usage: obj.focus_previous() without return types