code: def test_regression_only_metric(self):
      y_true = np.array([1, 2, 3, 4])
      y_pred = y_true.copy()
      scorer = autosklearn.metrics.root_mean_squared_error
  
      score = calculate_scores(y_true, y_pred, REGRESSION, [scorer])[
          "root_mean_squared_error"
      ]
      previous_score = scorer._optimum
      self.assertAlmostEqual(score, previous_score)
  
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 the TestCalculateScore obj's underlying member method code with example usage: obj.test_regression_only_metric() without return types