code: def select_layout(self, layout=None):
          
          cmd = ['select-layout', '-t%s:%s' % (self.get('session_id'), self.index)]
  
          if layout:  # tmux allows select-layout without args
              cmd.append(layout)
  
          proc = self.cmd(*cmd)
  
          if proc.stderr:
              raise exc.LibTmuxException(proc.stderr)
docs: Wrapper for ``$ tmux select-layout <layout>``.
  
          Parameters
          ----------
          layout : str, optional
              string of the layout, 'even-horizontal', 'tiled', etc. Entering
              None (leaving this blank) is same as ``select-layout`` with no
              layout. In recent tmux versions, it picks the most recently
              set layout.
  
              'even-horizontal'
                  Panes are spread out evenly from left to right across the
                  window.
              'even-vertical'
                  Panes are spread evenly from top to bottom.
              'main-horizontal'
                  A large (main) pane is shown at the top of the window and the
                  remaining panes are spread from left to right in the leftover
                  space at the bottom.
              'main-vertical'
                  Similar to main-horizontal but the large pane is placed on the
                  left and the others spread from top to bottom along the right.
              'tiled'
                  Panes are spread out as evenly as possible over the window in
                  both rows and columns.
              'custom'
                  custom dimensions (see :term:`tmux(1)` manpages).