code: function isPaneToggled(parentIndex, indexOrKey) {
              var pane = lxSelect.choicesViewSize === 'large' ? lxSelect.panes[parentIndex] : lxSelect.openedPanes[parentIndex];
  
              if (angular.isUndefined(pane)) {
                  return false;
              }
  
              var key = indexOrKey;
              if (angular.isObject(pane) && angular.isNumber(indexOrKey)) {
                  key = (Object.keys(pane) || [])[indexOrKey];
              }
  
              return angular.isDefined(toggledPanes[parentIndex]) && toggledPanes[parentIndex].key === key;
          }
docs: Check if a pane is toggled.
  
  @param  {number}        parentIndex The parent index of the pane in which to check.
  @param  {number|string} indexOrKey  The index or the name of the pane to check.
  @return {boolean}       If the pane is toggled or not.