code: def init_validate_scorers(
      scorers: t.Union[
          t.Mapping[str, t.Union[str, t.Callable]], t.List[str]
      ],
      model: BasicModel,
      dataset: "tabular.Dataset",
      model_classes: t.Optional[t.List],
      observed_classes: t.Optional[t.List],
  ) -> t.List[DeepcheckScorer]:
      """Initialize scorers and return all of them as deepchecks scorers.
  
      Parameters
      ----------
      scorers : Mapping[str, Union[str, Callable]]
          dict of scorers names to scorer sklearn_name/function or a list without a name
      model : BasicModel
          used to validate the scorers, and calculate mode_type if None.
      dataset : Dataset
          used to validate the scorers, and calculate mode_type if None.
      model_classes: t.Optional[t.List]
          possible classes output for model. None for regression tasks.
      observed_classes: t.Optional[t.List]
          observed classes from labels and predictions. None for regression tasks.
      Returns
      --------
      scorers: t.List[DeepcheckScorer]
          A list of initialized DeepcheckScorers.
      """
      if isinstance(scorers, t.Mapping):
          scorers = [
              DeepcheckScorer(
                  scorer, model_classes, observed_classes, name
              )
              for name, scorer in scorers.items()
          ]
      else:
          scorers = [
              DeepcheckScorer(scorer, model_classes, observed_classes)
              for scorer in scorers
          ]
      scorers: t.List[DeepcheckScorer]
      for s in scorers:
          s.validate_fitting(model, dataset)
      return scorers
  
imports: import logging
  import typing
  import warnings
  from numbers import Number
  from typing import TYPE_CHECKING
  import numpy
  import pandas
  from packaging import version
  from sklearn import __version__
  from sklearn.base import ClassifierMixin
  from sklearn.metrics import get_scorer, log_loss, make_scorer, mean_absolute_error, mean_squared_error
  from sklearn.metrics._scorer import _BaseScorer, _ProbaScorer
  from sklearn.preprocessing import OneHotEncoder
  from deepchecks.core import errors
  from deepchecks.tabular.metric_utils.additional_classification_metrics import false_negative_rate_metric, false_positive_rate_metric, roc_auc_per_class, true_negative_rate_metric
  from deepchecks.tabular.utils.task_type import TaskType
  from deepchecks.utils.docref import doclink
  from deepchecks.utils.logger import get_logger
  from deepchecks.utils.metrics import get_scorer_name
  from deepchecks.utils.simple_models import PerfectModel
  from deepchecks.utils.typing import BasicModel
  from deepchecks.utils.validation import is_sequence_not_str
label_desc: Use image node_id 2 for calling a global function with example usage: init_validate_scorers(scorers, model, dataset, model_classes, observed_classes) and returns: scorers