code: def test_config(multioutput):
      r2_obj = RSquare(multioutput=multioutput, name="r_square")
      assert r2_obj.name == "r_square"
      assert r2_obj.dtype == tf.float32
      assert r2_obj.multioutput == multioutput
      # Check save and restore config
      r2_obj2 = RSquare.from_config(r2_obj.get_config())
      assert r2_obj2.name == "r_square"
      assert r2_obj2.dtype == tf.float32
      assert r2_obj2.multioutput == multioutput
  
imports: import numpy
  import pytest
  import tensorflow
  from sklearn.metrics import r2_score
  from tensorflow_addons.metrics import RSquare
  from tensorflow_addons.metrics.r_square import _VALID_MULTIOUTPUT
label_desc: Use image node_id 1 for calling a global function with example usage: test_config(multioutput) without return types