class_docstr: A generic model selector.
  
  Parameters
  ----------
  models
  metric
class_docstr_tok: ["A","generic","model","selector",".","Parameters","--","--","--","--","--","models","metric"]
code: def __init__(
      self,
      models: Iterator[base.Estimator],
      metric: metrics.base.Metric,
  ):
      super().__init__(models)
      for model in models:
          if not metric.works_with(model):
              raise ValueError(
                  f"{metric.__class__.__name__} metric can't be used to evaluate a "
                  + f"{model.__class__.__name__}"
              )
      self.metric = metric
  
file_path: river/river/model_selection/base.py
imports: from __future__ import annotations
  from abc import ABC, abstractmethod
  from collections.abc import Iterator
  from river import base, metrics
label_desc: Use image node_id 1 to create a new ModelSelector object from inherited base classes: base, ABC with example: obj = ModelSelector(models, metric)