def METHOD_NAME(self):
    metric = ExampleMetric(name="mse")
    self.assertEqual(metric.name, "mse")
    self.assertEqual(len(metric.variables), 2)
    num_samples = 20
    y_true = np.random.random((num_samples, 3))
    y_pred = np.random.random((num_samples, 3))
    batch_size = 8
    for b in range(0, num_samples // batch_size + 1):
        y_true_batch = y_true[b * batch_size : (b + 1) * batch_size]
        y_pred_batch = y_pred[b * batch_size : (b + 1) * batch_size]
        metric.update_state(y_true_batch, y_pred_batch)
    self.assertAllClose(metric.total, 20)
    result = metric.result()
    self.assertAllClose(
        result, np.sum((y_true - y_pred) ** 2) / num_samples
    )
    metric.reset_state()
    self.assertEqual(metric.result(), 0.0)