code: def _compute_concat_output_shape(input_shape, axis):
      """Infers the output shape of concat given the input shape.
  
      The code is adapted from the ConcatLayer of lasagne
      (https://github.com/Lasagne/Lasagne/blob/master/lasagne/layers/merge.py)
  
      Args:
          input_shape (list): A list of shapes, each of which is in turn a
              list or TensorShape.
          axis (int): Axis of the concat operation.
  
      Returns:
          list: Output shape of concat.
      """
      # The size of each axis of the output shape equals the first
      # input size of respective axis that is not `None`
      input_shape = [tf.TensorShape(s).as_list() for s in input_shape]
      output_shape = [
          next((s for s in sizes if s is not None), None)
          for sizes in zip(*input_shape)
      ]
      axis_sizes = [s[axis] for s in input_shape]
      concat_axis_size = (
          None
          if any(s is None for s in axis_sizes)
          else sum(axis_sizes)
      )
      output_shape[axis] = concat_axis_size
      return output_shape
  
imports: import copy
  import tensorflow
  import tensorflow.contrib.rnn
  from texar.tf.hyperparams import HParams
  from texar.tf.utils import utils
  from texar.tf.utils.dtypes import is_str
  from texar.tf.utils.variables import add_variable
  from texar.tf.utils.mode import is_train_mode, switch_dropout
label_desc: Use image node_id 10 for calling a global function with example usage: _compute_concat_output_shape(input_shape, axis) and returns: output_shape