class_docstr: Base class for estimators (classifiers or regressors) in SRP
class_docstr_tok: ["Base","class","for","estimators","(","classifiers","or","regressors",")","in","SRP"]
code: def _trigger_warning(self, all_features, n_samples_seen: int):
      # Randomly generate a new subspace from all the original features
      subspace = (
          None
          if self.features is None
          else random_subspace(
              all_features=all_features,
              k=len(self.features),
              rng=self.rng,
          )
      )
  
      # Initialize the background learner
      self._background_learner = self.__class__(  # type: ignore
          idx_original=self.idx_original,
          model=self.model,
          metric=self.metric,
          created_on=n_samples_seen,
          drift_detector=self.drift_detector,
          warning_detector=self.warning_detector,
          is_background_learner=True,
          rng=self.rng,
          features=subspace,
      )
      # Hard-reset the warning method
      self.warning_detector = self.warning_detector.clone()
  
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 2 for calling the BaseSRPEstimator obj's underlying member method code with example usage: obj._trigger_warning(all_features, n_samples_seen) without return types