code: def testScalar1D(self):
      with self.session() as session, self.test_scope():
          data = np.array([0, 1, 2, 3, 7, 5])
          for dtype in self.all_tf_types:
              for indices in 4, [4], [1, 2, 2, 4, 5]:
                  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 = constant_op.constant(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 2 for calling the GatherTest obj's underlying member method code with example usage: obj.testScalar1D() without return types