class_docstr: BeamSearchDecoderMixin contains the common methods for
  BeamSearchDecoder.
  
  It is expected to be used a base class for concrete
  BeamSearchDecoder. Since this is a mixin class, it is expected to be
  used together with other class as base.
docstr: Get the output shape from the RNN layer.
docstr_tok: ["Get","the","output","shape","from","the","RNN","layer","."]
code: def _rnn_output_size(self):
      """Get the output shape from the RNN layer."""
      size = self._cell.output_size
      if self._output_layer is None:
          return size
      else:
          # To use layer's compute_output_shape, we need to convert the
          # RNNCell's output_size entries into shapes with an unknown
          # batch size.  We then pass this through the layer's
          # compute_output_shape and read off all but the first (batch)
          # dimensions to get the output size of the rnn with the layer
          # applied to the top.
          output_shape_with_unknown_batch = tf.nest.map_structure(
              lambda s: tf.TensorShape([None]).concatenate(s), size
          )
          layer_output_shape = self._output_layer.compute_output_shape(
              output_shape_with_unknown_batch
          )
          return tf.nest.map_structure(
              lambda s: s[1:], layer_output_shape
          )
  
imports: import collections
  import numpy
  import tensorflow
  from tensorflow_addons import options
  from tensorflow_addons.seq2seq import attention_wrapper
  from tensorflow_addons.seq2seq import decoder
  from tensorflow_addons.utils import keras_utils
  from tensorflow_addons.utils.resource_loader import LazySO
  from tensorflow_addons.utils.types import FloatTensorLike, TensorLike, Number
  from typeguard import typechecked
  from typing import Callable, Optional
label_desc: Use image node_id 3 for calling the BeamSearchDecoderMixin obj's underlying member method code with example usage: obj._rnn_output_size() and returns: size, tf