code: def deepchecks_scorer(scorer, clf, dataset):
      model_classes = infer_classes_from_model(clf)
      labels = get_all_labels(clf, dataset)
      observed_classes = sorted(labels.unique().tolist())
      return DeepcheckScorer(scorer, model_classes, observed_classes)
  
imports: import pandas
  from hamcrest import assert_that, calling, close_to, has_entries, is_, raises
  from sklearn.metrics import log_loss, make_scorer, mean_squared_error
  from deepchecks.core.errors import DeepchecksValueError
  from deepchecks.tabular import Dataset
  from deepchecks.tabular.metric_utils import DeepcheckScorer
  from deepchecks.tabular.metric_utils.additional_classification_metrics import false_negative_rate_metric, false_positive_rate_metric, true_negative_rate_metric
  from deepchecks.tabular.utils.task_inference import get_all_labels, infer_classes_from_model
  from deepchecks.utils.single_sample_metrics import calculate_neg_cross_entropy_per_sample, calculate_neg_mse_per_sample
  from tests.common import is_nan
label_desc: Use image node_id 1 for calling a global function with example usage: deepchecks_scorer(scorer, clf, dataset) and returns: DeepcheckScorer