code: def test_classification_multilabel():
      """
      Expects
      -------
      * Correct scores from CLASSIFICATION_METRICS for multi-label classification.
      """
      for (
          metric,
          scorer,
      ) in autosklearn.metrics.CLASSIFICATION_METRICS.items():
          # Skip functions not applicable for multi-label classification.
          if metric in [
              "roc_auc",
              "log_loss",
              "precision",
              "recall",
              "f1",
              "balanced_accuracy",
          ]:
              continue
          y_true = np.array(
              [[1, 0, 0], [1, 1, 0], [0, 1, 1], [1, 1, 1]]
          )
  
          y_pred_list = [
              np.array([[1, 0, 0], [1, 1, 0], [0, 1, 1], [1, 1, 1]]),
              np.array([[1, 0, 0], [0, 0, 1], [0, 1, 1], [1, 1, 1]]),
              np.array([[1, 0, 0], [0, 0, 1], [1, 0, 1], [1, 1, 0]]),
              np.array([[0, 1, 1], [0, 0, 1], [1, 0, 0], [0, 0, 0]]),
          ]
  
          score_list = [
              scorer(y_true, y_pred) for y_pred in y_pred_list
          ]
  
          assert scorer._optimum == pytest.approx(score_list[0])
          assert score_list == sorted(score_list, reverse=True)
  
imports: import warnings
  import numpy
  import sklearn.metrics
  import autosklearn.metrics
  from autosklearn.constants import BINARY_CLASSIFICATION, REGRESSION
  from autosklearn.metrics import calculate_losses, calculate_scores, compute_single_metric
  import pytest
  import unittest
label_desc: Use image node_id 8 for calling a global function with example usage: test_classification_multilabel() without return types