code: def test_iris_true_negative_rate_scorer_multiclass(
      iris_split_dataset_and_model,
  ):
      # Arrange
      _, test_ds, clf = iris_split_dataset_and_model
      per_class = deepchecks_scorer(
          make_scorer(
              true_negative_rate_metric, averaging_method="per_class"
          ),
          clf,
          test_ds,
      )
      macro = deepchecks_scorer(
          make_scorer(
              true_negative_rate_metric, averaging_method="macro"
          ),
          clf,
          test_ds,
      )
      micro = deepchecks_scorer(
          make_scorer(
              true_negative_rate_metric, averaging_method="micro"
          ),
          clf,
          test_ds,
      )
      weighted = deepchecks_scorer(
          make_scorer(
              true_negative_rate_metric, averaging_method="weighted"
          ),
          clf,
          test_ds,
      )
  
      # Act
      score_per_class = per_class(clf, test_ds)
      score_macro = macro(clf, test_ds)
      score_micro = micro(clf, test_ds)
      score_weighted = weighted(clf, test_ds)
  
      # Assert
      assert_that(score_per_class[0], close_to(1, 0))
      assert_that(score_per_class[1], close_to(0.789, 0.01))
      assert_that(score_per_class[2], close_to(1, 0.01))
      assert_that(
          sum(score_per_class.values()) / 3,
          close_to(score_macro, 0.00001),
      )
      assert_that(score_micro, close_to(0.92, 0.01))
      assert_that(score_weighted, close_to(0.936, 0.01))
  
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 8 for calling a global function with example usage: test_iris_true_negative_rate_scorer_multiclass(iris_split_dataset_and_model) without return types