code: def testAccumulatorRepeatedTakeGradMean(self):
      with self.cached_session():
          q = data_flow_ops.ConditionalAccumulator(
              dtypes_lib.float32,
              name="Q",
              shape=tensor_shape.TensorShape([1]),
          )
  
          elems = [10.0, 20.0]
          elems_ave = sum(elems) / len(elems)
          accum_ops = [q.apply_grad((x,), local_step=0) for x in elems]
          takeg_t = q.take_grad(1)
  
          for accum_op in accum_ops:
              accum_op.run()
  
          val = self.evaluate(takeg_t)
          self.assertEqual(elems_ave, val)
  
          elems = [20.0, 30.0]
          elems_ave = sum(elems) / len(elems)
          accum_ops = [q.apply_grad((x,), local_step=1) for x in elems]
          takeg_t = q.take_grad(1)
  
          for accum_op in accum_ops:
              accum_op.run()
  
          val = self.evaluate(takeg_t)
          self.assertEqual(elems_ave + 0.0, val)
  
imports: import time
  import numpy
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors_impl
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import tensor_shape
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import data_flow_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import state_ops
  from tensorflow.python.ops import variables
  from tensorflow.python.platform import test
label_desc: Use image node_id 17 for calling the ConditionalAccumulatorTest obj's underlying member method code with example usage: obj.testAccumulatorRepeatedTakeGradMean() without return types