code: def iter_create_panes(self, w, wconf):
          
          assert isinstance(w, Window)
  
          pane_base_index = int(w.show_window_option('pane-base-index', g=True))
  
          p = None
  
          for pindex, pconf in enumerate(wconf['panes'], start=pane_base_index):
              if pindex == int(pane_base_index):
                  p = w.attached_pane
              else:
  
                  def get_pane_start_directory():
  
                      if 'start_directory' in pconf:
                          return pconf['start_directory']
                      elif 'start_directory' in wconf:
                          return wconf['start_directory']
                      else:
                          return None
  
                  p = w.split_window(
                      attach=True, start_directory=get_pane_start_directory(), target=p.id
                  )
  
              assert isinstance(p, Pane)
              if 'layout' in wconf:
                  w.select_layout(wconf['layout'])
  
              if 'suppress_history' in pconf:
                  suppress = pconf['suppress_history']
              elif 'suppress_history' in wconf:
                  suppress = wconf['suppress_history']
              else:
                  suppress = True
  
              for cmd in pconf['shell_command']:
                  p.send_keys(cmd, suppress_history=suppress)
  
              if 'focus' in pconf and pconf['focus']:
                  w.select_pane(p['pane_id'])
  
              w.server._update_panes()
  
              yield p, pconf
docs: Return :class:`libtmux.Pane` iterating through window config dict.
  
          Run ``shell_command`` with ``$ tmux send-keys``.
  
          Parameters
          ----------
          w : :class:`libtmux.Window`
              window to create panes for
          wconf : dict
              config section for window
  
          Returns
          -------
          tuple of (:class:`libtmux.Pane`, ``pconf``)
              Newly created pane, and the section from the tmuxp configuration
              that was used to create the pane.