class_docstr: Tests the gather_tree function
code: def test_gather_tree(self):
      predicted_ids = np.array([[1, 2, 3], [4, 5, 6], [7, 8, 9]])
      parent_ids = np.array([[0, 0, 0], [0, 1, 1], [2, 1, 2]])
      expected_result = np.array([[2, 2, 2], [6, 5, 6], [7, 8, 9]])
  
      res = beam_search.gather_tree(
          tf.convert_to_tensor(predicted_ids),
          tf.convert_to_tensor(parent_ids),
      )
      with self.test_session() as sess:
          res_ = sess.run(res)
  
      np.testing.assert_array_equal(expected_result, res_)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from __future__ import unicode_literals
  import tensorflow
  import numpy
  from seq2seq.inference import beam_search
label_desc: Use image node_id 1 for calling the TestGatherTree obj's underlying member method code with example usage: obj.test_gather_tree() without return types