code: def testShapeInferenceForScalarWithNonConstantIndices(self):
      with test_util.use_gpu():
          indices = [
              array_ops.placeholder(dtype=dtypes.int32),
              constant_op.constant(1),
          ]
          data = [constant_op.constant(40), constant_op.constant(60)]
          for step in -1, 1:
              stitched_t = self.stitch_op(indices[::step], data)
              # Dimension 0 is max(flatten(indices))+1, but the first indices input is
              # not a constant tensor, so we can only infer it as a vector of unknown
              # length.
              self.assertEqual([None], stitched_t.get_shape().as_list())
  
imports: import numpy
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors
  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 gradients_impl
  import tensorflow.python.ops.data_flow_grad
  from tensorflow.python.platform import test
label_desc: Use image node_id 3 for calling the DynamicStitchTestBase obj's underlying member method code with example usage: obj.testShapeInferenceForScalarWithNonConstantIndices() without return types