class_docstr: The BeamSearchDecoder wraps another decoder to perform beam search instead
  of greedy selection. This decoder must be used with batch size of 1, which
  will result in an effective batch size of `beam_width`.
  
  Args:
    decoder: A instance of `RNNDecoder` to be used with beam search.
    config: A `BeamSearchConfig` that defines beam search decoding parameters.
code: def __init__(self, decoder, config):
      super(BeamSearchDecoder, self).__init__(
          decoder.params, decoder.mode, decoder.name
      )
      self.decoder = decoder
      self.config = config
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from __future__ import unicode_literals
  from collections import namedtuple
  import tensorflow
  from tensorflow.python.util import nest
  from seq2seq.inference import beam_search
  from seq2seq.decoders.rnn_decoder import RNNDecoder
label_desc: Use image node_id 1 to create a new BeamSearchDecoder object from inherited base classes: RNNDecoder with example: obj = BeamSearchDecoder(decoder, config)