class_docstr: Base class that tests mirrored variable creator.
  
  Currently it assumes all strategy objects have two replicas.
class_docstr_tok: ["Base","class","that","tests","mirrored","variable","creator",".","Currently","it","assumes","all","strategy","objects","have","two","replicas","."]
code: def testSyncOnReadVariableUpdate(self, distribution):
      def model_fn():
          v_sum = variable_v1.VariableV1(
              1.0,
              synchronization=variable_scope.VariableSynchronization.ON_READ,
              aggregation=variable_scope.VariableAggregation.SUM,
          )
          self.assertTrue(distribute_utils.is_sync_on_read(v_sum))
          return v_sum
  
      def update(var, value):
          return var.assign(value)
  
      with distribution.scope():
          ret_v_sum = distribution.extended.call_for_each_replica(
              model_fn
          )
  
          # Initialize variables.
          self.evaluate(variables.global_variables_initializer())
          # Assert that the aggregated value of the sync on read var is the sum
          # of the individual values before running the update ops.
          self.assertEqual(
              1.0,
              self.evaluate(
                  distribution.experimental_local_results(ret_v_sum)[
                      0
                  ].read_value()
              ),
          )
          self.assertEqual(2.0, self.evaluate(ret_v_sum))
  
          # Apply updates.
          update_ops = distribution.extended.update(
              ret_v_sum, update, args=(5.0,), group=False
          )
          self.evaluate(update_ops)
          # Assert that the aggregated value of the sync on read vars is the sum
          # of the individual values after running the update ops.
          self.assertEqual(
              5.0,
              self.evaluate(
                  distribution.experimental_local_results(ret_v_sum)[
                      0
                  ].read_value()
              ),
          )
          self.assertEqual(10.0, self.evaluate(ret_v_sum))
  
imports: from tensorflow.python.checkpoint import checkpoint
  from tensorflow.python.distribute import collective_all_reduce_strategy
  from tensorflow.python.distribute import combinations
  from tensorflow.python.distribute import distribute_lib
  from tensorflow.python.distribute import distribute_utils
  from tensorflow.python.distribute import strategy_combinations
  from tensorflow.python.distribute import values
  from tensorflow.python.eager import backprop
  from tensorflow.python.eager import context
  from tensorflow.python.eager import def_function
  from tensorflow.python.eager import test
  from tensorflow.python.framework import config
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors
  from tensorflow.python.framework import func_graph
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import tensor
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import custom_gradient
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import rnn
  from tensorflow.python.ops import rnn_cell_impl
  from tensorflow.python.ops import state_ops
  from tensorflow.python.ops import variable_scope
  from tensorflow.python.ops import variable_v1
  from tensorflow.python.ops import variables
  from tensorflow.python.saved_model import load
  from tensorflow.python.saved_model import save
label_desc: Use image node_id 23 for calling the MirroredVariableCreationTest obj's underlying member method code with example usage: obj.testSyncOnReadVariableUpdate(distribution) and returns: v_sum, var