code: def test_stateless_update_state(self):
      metric = ExampleMetric(name="mse")
      self.assertEqual(len(metric.variables), 2)
      original_variable_values = (
          metric.variables[0].numpy(),
          metric.variables[1].numpy(),
      )
  
      num_samples = 20
      y_true = np.random.random((num_samples, 3))
      y_pred = np.random.random((num_samples, 3))
      batch_size = 8
      metric_variables = metric.variables
      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_variables = metric.stateless_update_state(
              metric_variables, y_true_batch, y_pred_batch
          )
  
      self.assertAllClose(
          metric.variables[0], original_variable_values[0]
      )
      self.assertAllClose(
          metric.variables[1], original_variable_values[1]
      )
      metric.variables[0].assign(metric_variables[0])
      metric.variables[1].assign(metric_variables[1])
      self.assertAllClose(metric.total, 20)
      result = metric.result()
      self.assertAllClose(
          result, np.sum((y_true - y_pred) ** 2) / num_samples
      )
  
      if backend.backend() == "jax":
          # Check no side effects.
          import jax
  
          @jax.jit
          def update(metric_variables, y_true_batch, y_pred_batch):
              metric_variables = metric.stateless_update_state(
                  metric_variables, y_true_batch, y_pred_batch
              )
  
          update(metric_variables, y_true_batch, y_pred_batch)
  
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 2 for calling the MetricTest obj's underlying member method code with example usage: obj.test_stateless_update_state() without return types