code: def testUnknownAxis(self):
      # This test is purely a test for placeholder inputs which is only applicable
      # in graph mode.
      with ops.Graph().as_default():
          params = constant_op.constant([[0, 1, 2]])
          indices = constant_op.constant([[0, 0], [0, 0]])
          axis = array_ops.placeholder(dtypes.int32)
          gather_t = array_ops.gather(params, indices, axis=axis)
          # Rank 2 params with rank 2 indices results in a rank 3 shape.
          self.assertEqual([None, None, None], gather_t.shape.as_list())
  
          # If indices is also unknown the result rank is unknown.
          indices = array_ops.placeholder(dtypes.int32)
          gather_t = array_ops.gather(params, indices, axis=axis)
          self.assertEqual(None, gather_t.shape)
  
imports: from absl.testing import parameterized
  import numpy
  from tensorflow.python.eager import backprop
  from tensorflow.python.eager import def_function
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors
  from tensorflow.python.framework import indexed_slices
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import tensor_spec
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import gradient_checker_v2
  from tensorflow.python.ops import gradients_impl
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import ref_variable
  from tensorflow.python.ops import resource_variable_ops
  from tensorflow.python.ops import variables
  from tensorflow.python.platform import test
label_desc: Use image node_id 10 for calling the GatherTest obj's underlying member method code with example usage: obj.testUnknownAxis() without return types