docs: def _create_stacking_set(estimators, estimators_features, estimators_weight, X, combination):
      """Private function used to create the stacking training set."""
      n_samples = X.shape[0]
  
      valid_estimators = np.nonzero(estimators_weight)[0]
      n_valid_estimators = valid_estimators.shape[0]
      X_stacking = np.zeros((n_samples, n_valid_estimators))
  
      for e in range(n_valid_estimators):
          if combination in ['stacking', 'stacking_bmr']:
              X_stacking[:, e] = estimators[valid_estimators[e]].predict(X[:, estimators_features[valid_estimators[e]]])
          elif combination in ['stacking_proba', 'stacking_proba_bmr']:
              X_stacking[:, e] = estimators[valid_estimators[e]].predict_proba(X[:, estimators_features[valid_estimators[e]]])[:, 1]
  
      return X_stacking