code: def testGatherPrecision(self):
      with self.session() as session, self.test_scope():
          data = np.array(
              [
                  [0, 0, 0, 0],
                  [0, 2 * (1 + np.exp2(-8)), 0, 0],
                  [0, 0, 0, 0],
                  [0.015789, 0.0985, 0.55789, 0.3842],
              ]
          )
          indices = np.array([1, 2, 3, 1])
          dtype = dtypes.float32
          params_np = self._buildParams(data, dtype)
          params = array_ops.placeholder(dtype=dtype)
          indices_tf = constant_op.constant(indices)
          gather_t = array_ops.gather(params, indices_tf)
          gather_val = session.run(
              gather_t, feed_dict={params: params_np}
          )
          np_val = params_np[indices]
          self.assertAllEqual(np_val, gather_val)
  
imports: import numpy
  from tensorflow.compiler.tests import xla_test
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import variables
  from tensorflow.python.platform import flags
  from tensorflow.python.platform import test
label_desc: Use image node_id 8 for calling the GatherTest obj's underlying member method code with example usage: obj.testGatherPrecision() without return types