code: function _closePane(index) {
              if (index === 0) {
                  _closePanes();
  
                  return;
              }
  
              if (angular.isUndefined(toggledPanes[index])) {
                  return;
              }
  
              _closePane(index + 1);
  
              if (lxSelect.choicesViewSize === 'large') {
                  lxSelect.panes.splice(toggledPanes[index].position, 1);
              } else {
                  lxSelect.openedPanes.splice(toggledPanes[index].position, 1);
              }
  
              delete toggledPanes[index];
          }
docs: /////////////////////////// // Private functions    // // /////////////////////////// 
  Close the given panes (and all of its children panes).
  
  @param {number} index The index of the pane to close.