code: def test_regression_all():
      """
      Expects
      -------
      * Correct scores from REGRESSION_METRICS.
      """
      for (
          metric,
          scorer,
      ) in autosklearn.metrics.REGRESSION_METRICS.items():
          if scorer.name == "mean_squared_log_error":
              continue
  
          y_true = np.array([1, 2, 3, 4])
  
          y_pred_list = [
              np.array([1, 2, 3, 4]),
              np.array([3, 4, 5, 6]),
              np.array([-1, 0, -1, 0]),
              np.array([-5, 10, 7, -3]),
          ]
  
          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 5 for calling a global function with example usage: test_regression_all() without return types