code: def test_end_to_end_flow(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)
  
imports: import numpy
  from keras import backend
  from keras import initializers
  from keras import metrics
  from keras import ops
  from keras import testing
  from keras.metrics.metric import Metric
label_desc: Use image node_id 1 for calling the MetricTest obj's underlying member method code with example usage: obj.test_end_to_end_flow() without return types