code: def testEmptyIndicesAndParamsOKButJustEmptyParamsFails(self):
      with self.session():
          params = np.ones((3, 3), dtype=np.float32)
  
          indices_empty = np.empty((0, 2), dtype=np.int32)
          gather_nd_ok_t = array_ops.gather_nd(params, indices_empty)
          gather_nd_ok_val = self.evaluate(gather_nd_ok_t)
          self.assertEqual([0], gather_nd_ok_t.get_shape())
          self.assertAllClose(
              np.empty((0,), dtype=np.float32), gather_nd_ok_val
          )
  
          indices_empty = np.empty((0, 1), dtype=np.int32)
          gather_nd_ok_t = array_ops.gather_nd(params, indices_empty)
          gather_nd_ok_val = self.evaluate(gather_nd_ok_t)
          self.assertEqual([0, 3], gather_nd_ok_t.get_shape())
          self.assertAllClose(
              np.empty((0, 3), dtype=np.float32), gather_nd_ok_val
          )
  
          params_empty = np.empty((0, 3), dtype=np.float32)
          indices_empty = np.empty((0, 2), dtype=np.int32)
          gather_nd_ok_t = array_ops.gather_nd(
              params_empty, indices_empty
          )
          gather_nd_ok_val = self.evaluate(gather_nd_ok_t)
          self.assertEqual([0], gather_nd_ok_t.get_shape())
          self.assertAllClose(
              np.empty((0,), dtype=np.float32), gather_nd_ok_val
          )
  
          params_empty = np.empty((0, 3), dtype=np.float32)
          indices_nonempty = np.zeros((1, 2), dtype=np.int32)
          gather_nd_break_t = array_ops.gather_nd(
              params_empty, indices_nonempty
          )
          with self.assertRaisesOpError(
              r"Requested more than 0 entries, but params is empty."
          ):
              self.evaluate(gather_nd_break_t)
          self.assertAllClose(
              np.empty((0,), dtype=np.float32), gather_nd_ok_val
          )
  
imports: import time
  import numpy
  from tensorflow.python.client import session
  from tensorflow.python.eager import context
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import indexed_slices
  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 gradients_impl
  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 3 for calling the GatherNdTest obj's underlying member method code with example usage: obj.testEmptyIndicesAndParamsOKButJustEmptyParamsFails() without return types