code: def test_weighted(self):
      rmse_obj = metrics.RootMeanSquaredError()
      y_true = np.array([2, 4, 6])
      y_pred = np.array([1, 3, 2])
      y_true = np.array([2, 4, 6, 8])
      y_pred = np.array([1, 3, 2, 3])
      sample_weight = np.array([0, 1, 0, 1])
      result = rmse_obj(y_true, y_pred, sample_weight=sample_weight)
      self.assertAllClose(np.sqrt(13), result, atol=1e-3)
  
imports: import numpy
  from absl.testing import parameterized
  from keras import testing
  from keras.metrics import regression_metrics
label_desc: Use image node_id 3 for calling the RootMeanSquaredErrorTest obj's underlying member method code with example usage: obj.test_weighted() without return types