code: def test_classification_scoring_functions(self):
      scoring_functions = list(
          autosklearn.metrics.CLASSIFICATION_METRICS.values()
      )
      scoring_functions.remove(autosklearn.metrics.accuracy)
      fail_metrics = [
          "precision_samples",
          "recall_samples",
          "f1_samples",
      ]
      success_metrics = list(
          autosklearn.metrics.CLASSIFICATION_METRICS.keys()
      )
      for metric in fail_metrics:
          success_metrics.remove(metric)
  
      y_true = np.array([1.0, 1.0, 1.0, 0.0, 0.0, 0.0])
      y_pred = np.array(
          [
              [0.0, 1.0],
              [0.0, 1.0],
              [0.0, 1.0],
              [1.0, 0.0],
              [1.0, 0.0],
              [1.0, 0.0],
          ]
      )
      score_dict = calculate_scores(
          y_true,
          y_pred,
          BINARY_CLASSIFICATION,
          [autosklearn.metrics.accuracy],
          scoring_functions=scoring_functions,
      )
  
      self.assertIsInstance(score_dict, dict)
      self.assertTrue(len(success_metrics), len(score_dict))
      for metric in fail_metrics:
          self.assertNotIn(metric, score_dict.keys())
      for metric in success_metrics:
          self.assertIn(metric, score_dict.keys())
          self.assertAlmostEqual(
              autosklearn.metrics.CLASSIFICATION_METRICS[
                  metric
              ]._optimum,
              score_dict[metric],
          )
  
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 2 for calling the TestCalculateScore obj's underlying member method code with example usage: obj.test_classification_scoring_functions() without return types