code: def test_r2(self):
      from sklearn.metrics import r2_score
  
      assert metrics.r2_score(self.series1, self.series0) == 0
      assert metrics.r2_score(self.series1, self.series2) == r2_score(
          self.series1.values(), self.series2.values()
      )
  
      self.helper_test_multivariate_duplication_equality(
          metrics.r2_score
      )
      self.helper_test_multiple_ts_duplication_equality(
          metrics.r2_score
      )
      self.helper_test_nan(metrics.r2_score)
  
imports: import numpy
  import pandas
  import pytest
  from darts import TimeSeries
  from darts.metrics import metrics
label_desc: Use image node_id 8 for calling the TestMetrics obj's underlying member method code with example usage: obj.test_r2() without return types