class_docstr: Base class for the sRP ensemble family
class_docstr_tok: ["Base","class","for","the","sRP","ensemble","family"]
code: def _init_ensemble(self, features: list):
      self._generate_subspaces(features=features)
      subspace_indexes = list(
          range(self.n_models)
      )  # For matching subspaces with ensemble members
      if (
          self.training_method == self._TRAIN_RANDOM_PATCHES
          or self.training_method == self._TRAIN_RANDOM_SUBSPACES
      ):
          # Shuffle indexes
          self._rng.shuffle(subspace_indexes)
  
      # Initialize the ensemble
      for i in range(self.n_models):
          # If self.training_method == self._TRAIN_RESAMPLING then subspace is None
          subspace = self._subspaces[subspace_indexes[i]]
          self.append(
              self._base_learner_class(  # type: ignore
                  idx_original=i,
                  model=self.model,
                  metric=self.metric,
                  created_on=self._n_samples_seen,
                  drift_detector=self.drift_detector,
                  warning_detector=self.warning_detector,
                  is_background_learner=False,
                  rng=self._rng,
                  features=subspace,
              )
          )
  
imports: from __future__ import annotations
  import collections
  import itertools
  import math
  import random
  import numpy
  from river import base
  from river.drift import ADWIN
  from river.metrics import MAE, Accuracy
  from river.metrics.base import ClassificationMetric, Metric, RegressionMetric
  from river.tree import HoeffdingTreeClassifier, HoeffdingTreeRegressor
  from river.utils.random import poisson
label_desc: Use image node_id 8 for calling the BaseSRPEnsemble obj's underlying member method code with example usage: obj._init_ensemble(features) without return types