code: def testApplyGradtInt32IndicesAndShape(self):
      with self.cached_session() as sess:
          q = data_flow_ops.SparseConditionalAccumulator(
              dtypes_lib.float32,
              name="Q",
              shape=tensor_shape.TensorShape([3, 3]),
          )
          accum_op = q.apply_grad(
              grad_indices=constant_op.constant(
                  [0, 2], dtype=dtypes_lib.int32
              ),
              grad_values=constant_op.constant(
                  [[0, 0, 1], [3, 0, 4]], dtype=dtypes_lib.float32
              ),
              grad_shape=constant_op.constant(
                  [3, 3], dtype=dtypes_lib.int32
              ),
          )
          accum_op.run()
          accum_op = q.apply_indexed_slices_grad(
              indexed_slices.IndexedSlices(
                  indices=constant_op.constant(
                      [0, 2], dtype=dtypes_lib.int32
                  ),
                  values=constant_op.constant(
                      [[0, 0, 1], [3, 0, 4]], dtype=dtypes_lib.float32
                  ),
                  dense_shape=constant_op.constant(
                      [3, 3], dtype=dtypes_lib.int32
                  ),
              )
          )
          accum_op.run()
          self.assertEqual(q.num_accumulated().eval(), 2)
  
          val = self.evaluate(q.take_indexed_slices_grad(1))
          self.assertAllEqual(val.indices, [0, 2])
          self.assertAllEqual(val.values, [[0, 0, 1], [3, 0, 4]])
          self.assertAllEqual(val.dense_shape, [3, 3])
  
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 indexed_slices
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import tensor
  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.platform import test
label_desc: Use image node_id 29 for calling the IndexedSlicesConditionalAccumulatorTest obj's underlying member method code with example usage: obj.testApplyGradtInt32IndicesAndShape() without return types