parameters: (self, t, s)
docstring: Maybe splits the tensor from a batch by beams into a batch of beams.
  
      We do this so that we can use nest and not run into problems with shapes.
  
      Args:
        t: `Tensor`, either scalar or shaped `[batch_size * beam_width] + s`.
        s: `Tensor`, Python int, or `TensorShape`.
  
      Returns:
        If `t` is a matrix or higher order tensor, then the return value is
        `t` reshaped to `[batch_size, beam_width] + s`.  Otherwise `t` is
        returned unchanged.
  
      Raises:
        TypeError: If `t` is an instance of `TensorArray`.
        ValueError: If the rank of `t` is not statically known.
docstring_summary: Maybe splits the tensor from a batch by beams into a batch of beams.
docstring_tokens: Maybe splits the tensor from a batch by beams into a batch of beams .
function: def _maybe_split_batch_beams(self, t, s):
      """Maybe splits the tensor from a batch by beams into a batch of beams.
  
      We do this so that we can use nest and not run into problems with shapes.
  
      Args:
        t: `Tensor`, either scalar or shaped `[batch_size * beam_width] + s`.
        s: `Tensor`, Python int, or `TensorShape`.
  
      Returns:
        If `t` is a matrix or higher order tensor, then the return value is
        `t` reshaped to `[batch_size, beam_width] + s`.  Otherwise `t` is
        returned unchanged.
  
      Raises:
        TypeError: If `t` is an instance of `TensorArray`.
        ValueError: If the rank of `t` is not statically known.
      """
      _check_maybe(t)
      if t.shape.ndims >= 1:
        return self._split_batch_beams(t, s)
      else:
        return t
function_tokens: def _maybe_split_batch_beams ( self , t , s ) : _check_maybe ( t ) if t . shape . ndims >= 1 : return self . _split_batch_beams ( t , s ) else : return t