code: def test_classification_metrics():
      """
      Expects
      -------
      * Test metrics do not change output for autosklearn.metrics.CLASSIFICATION_METRICS.
      """
      for (
          metric,
          scorer,
      ) in autosklearn.metrics.CLASSIFICATION_METRICS.items():
          y_true = np.random.randint(0, 2, size=(100, 1))
          y_pred = np.random.random(200).reshape((-1, 2))
          y_pred = np.array(
              [y_pred[i] / np.sum(y_pred[i]) for i in range(100)]
          )
  
          y_true_2 = y_true.copy()
          y_pred_2 = y_pred.copy()
          try:
              assert np.isfinite(scorer(y_true_2, y_pred_2))
              np.testing.assert_array_almost_equal(
                  y_true, y_true_2, err_msg=metric
              )
              np.testing.assert_array_almost_equal(
                  y_pred, y_pred_2, err_msg=metric
              )
          except ValueError as e:
              if (
                  e.args[0]
                  == "Samplewise metrics are not available outside"
                  " of multilabel classification."
              ):
                  pass
              else:
                  raise e
  
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 4 for calling a global function with example usage: test_classification_metrics() without return types