code: def squash_sequence(input_layer):
    Squashes a sequence into a single Tensor with dim 1 being time*batch.
  
    A sequence is an array of Tensors, which is not appropriate for most
    operations, this squashes them together into Tensor.
  
    Defaults are assigned such that cleave_sequence requires no args.
  
    Args:
      input_layer: The input layer.
    Returns:
      A PrettyTensor containing a single tensor with the first dim containing
      both time and batch.
    Raises:
      ValueError: If the sequence is empty.
    """
    timesteps = len(input_layer.sequence)
    if not timesteps:
      raise ValueError('Empty tensor sequence.')
    elif timesteps == 1:
      result = input_layer.sequence[0]
    else:
      result = tf.concat(input_layer.sequence, 0)
    return input_layer.with_tensor(result).with_defaults(unroll=timesteps)
docs: Squashes a sequence into a single Tensor with dim 1 being time*batch.
  
    A sequence is an array of Tensors, which is not appropriate for most
    operations, this squashes them together into Tensor.
  
    Defaults are assigned such that cleave_sequence requires no args.
  
    Args:
      input_layer: The input layer.
    Returns:
      A PrettyTensor containing a single tensor with the first dim containing
      both time and batch.
    Raises:
      ValueError: If the sequence is empty.