docs: def split_window(
          self, target=None, start_directory=None, attach=True, vertical=True, shell=None
      ):
          """
          Split window and return the created :class:`Pane`.
  
          Used for splitting window and holding in a python object.
  
          Parameters
          ----------
          attach : bool, optional
              make new window the current window after creating it, default
              True.
          start_directory : str, optional
              specifies the working directory in which the new window is created.
          target : str
              ``target_pane`` to split.
          vertical : str
              split vertically
          shell : str, optional
              execute a command on splitting the window.  The pane will close
              when the command exits.
  
              NOTE: When this command exits the pane will close.  This feature
              is useful for long-running processes where the closing of the
              window upon completion is desired.
  
          Returns
          -------
          :class:`Pane`
  
          Notes
          -----
  
          :term:`tmux(1)` will move window to the new pane if the
          ``split-window`` target is off screen. tmux handles the ``-d`` the
          same way as ``new-window`` and ``attach`` in
          :class:`Session.new_window`.
  
          By default, this will make the window the pane is created in
          active. To remain on the same window and split the pane in another
          target window, pass in ``attach=False``.
          """
          pformats = [
              'session_name',
              'session_id',
              'window_index',
              'window_id',
          ] + formats.PANE_FORMATS
          tmux_formats = ['#{%s}\t' % f for f in pformats]
  
          # '-t%s' % self.attached_pane.get('pane_id'),
          # 2013-10-18 LOOK AT THIS, rm'd it..
          tmux_args = tuple()
  
          if target:
              tmux_args += ('-t%s' % target,)
          else:
              tmux_args += ('-t%s' % self.panes[0].get('pane_id'),)
  
          if vertical:
              tmux_args += ('-v',)
          else:
              tmux_args += ('-h',)
  
          tmux_args += ('-P', '-F%s' % ''.join(tmux_formats))  # output
  
          if start_directory:
              # as of 2014-02-08 tmux 1.9-dev doesn't expand ~ in new-window -c.
              start_directory = os.path.expanduser(start_directory)
              tmux_args += ('-c%s' % start_directory,)
  
          if not attach:
              tmux_args += ('-d',)
  
          if shell:
              tmux_args += (shell,)
  
          pane = self.cmd('split-window', *tmux_args)
  
          # tmux < 1.7. This is added in 1.7.
          if pane.stderr:
              raise exc.LibTmuxException(pane.stderr)
              if 'pane too small' in pane.stderr:
                  pass
  
              raise exc.LibTmuxException(pane.stderr, self._info, self.panes)
          else:
              pane = pane.stdout[0]
  
              pane = dict(zip(pformats, pane.split('\t')))
  
              # clear up empty dict
              pane = dict((k, v) for k, v in pane.items() if v)
  
          return Pane(window=self, **pane)