code: def testReturnShape(self):
      with self.cached_session() as sess:
          q = data_flow_ops.SparseConditionalAccumulator(
              dtypes_lib.float32, name="Q", shape=[2, None]
          )
  
          q.apply_grad(
              grad_indices=[0],
              grad_values=np.array(
                  [[[[1, 2], [3, 4]], [[5, 6], [7, 8]]]]
              ).astype(np.float32),
          ).run()
  
          val = self.evaluate(q.take_indexed_slices_grad(1))
          self.assertAllEqual(val.dense_shape, [2, 2, 2, 2])
  
          q = data_flow_ops.SparseConditionalAccumulator(
              dtypes_lib.float32, name="Q", shape=[None, 2]
          )
  
          q.apply_grad(
              grad_indices=[0],
              grad_values=np.array(
                  [[[[1, 2, 3], [4, 5, 6]], [[7, 8, 9], [10, 11, 12]]]]
              ).astype(np.float32),
          ).run()
  
          val = self.evaluate(q.take_indexed_slices_grad(1))
          self.assertAllEqual(val.dense_shape, [-1, 2, 2, 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 28 for calling the IndexedSlicesConditionalAccumulatorTest obj's underlying member method code with example usage: obj.testReturnShape() without return types