code: def _forward_single_output_layer(inputs, input_size, output_layer):
      """Forwards the input through a single output layer.
  
      Args:
          inputs: A Tensor of shape `[batch_size, max_time] + input_size` if
              :attr:`time_major=False`, or shape
              `[max_time, batch_size] + input_size` if :attr:`time_major=True`.
          input_size: An `int` or 1D `int` array.
      """
      dim = np.prod(input_size)
      inputs_flat = inputs
      inputs_flat = tf.reshape(inputs_flat, [-1, dim])
      # Feed to the layer
      output_flat = output_layer(inputs_flat)
      output_size = output_layer.compute_output_shape(
          [1, dim]
      ).as_list()[1:]
      output_size = np.array(output_size)
      # Reshape output to [batch_size/max_time, max_time/batch_size] + output_size
      output_shape = tf.concat(
          [tf.shape(inputs)[:2], output_size], axis=0
      )
      output = tf.reshape(output_flat, output_shape)
      return output, output_size
  
imports: import functools
  import numpy
  import tensorflow
  from tensorflow.contrib.framework import nest
  from texar.tf.modules.encoders.encoder_base import EncoderBase
  from texar.tf.modules.networks.conv_networks import _to_list
  from texar.tf.core import layers
  from texar.tf.utils.mode import is_train_mode
  from texar.tf.utils.shapes import mask_sequences
  from texar.tf.hyperparams import HParams
label_desc: Use image node_id 3 for calling a global function with example usage: _forward_single_output_layer(inputs, input_size, output_layer) and returns: output,  output_size