code: def test_config(self):
      r2_obj = metrics.R2Score(
          class_aggregation=None, num_regressors=2, dtype="float32"
      )
      self.assertEqual(r2_obj.class_aggregation, None)
      self.assertEqual(r2_obj.num_regressors, 2)
      self.assertEqual(r2_obj.dtype, "float32")
  
      # Check save and restore config
      r2_obj2 = metrics.R2Score.from_config(r2_obj.get_config())
      self.assertEqual(r2_obj2.class_aggregation, None)
      self.assertEqual(r2_obj2.num_regressors, 2)
      self.assertEqual(r2_obj2.dtype, "float32")
  
imports: import numpy
  from absl.testing import parameterized
  from keras import testing
  from keras.metrics import regression_metrics
label_desc: Use image node_id 2 for calling the R2ScoreTest obj's underlying member method code with example usage: obj.test_config() without return types