class_docstr: Hard sampler.
code: def _model_pred_func(self) -> typing.Callable:
      if isinstance(self.model, base.Classifier):
          if not self.model._multiclass:
              return lambda x: self.model.predict_proba_one(x)[True]
          return self.model.predict_proba_one
      return self.model.predict_one
  
imports: from __future__ import annotations
  import collections
  import random
  import typing
  from river import base, linear_model, optim, utils
label_desc: Use image node_id 4 for calling the HardSampling obj's underlying member method code with example usage: obj._model_pred_func() and returns: self, self, function