code: def choose_top_k(scores_flat, config):
      """Chooses the top-k beams as successors."""
      next_beam_scores, word_indices = tf.nn.top_k(
          scores_flat, k=config.beam_width
      )
      return next_beam_scores, word_indices
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from collections import namedtuple
  import numpy
  import tensorflow
  from tensorflow.python.util import nest
label_desc: Use image node_id 6 for calling a global function with example usage: choose_top_k(scores_flat, config) and returns: next_beam_scores,  word_indices