code: def _assert_same_size(outputs, output_size):
      """Check if outputs match output_size
  
      Args:
          outputs: A Tensor or a (nested) tuple of tensors
          output_size: Can be an Integer, a TensorShape, or a (nested) tuple of
              Integers or TensorShape.
      """
      nest.assert_same_structure(outputs, output_size)
      flat_output_size = nest.flatten(output_size)
      flat_output = nest.flatten(outputs)
  
      for output, size in zip(flat_output, flat_output_size):
          if isinstance(size, tf.TensorShape):
              if output.shape == size:
                  pass
          elif output[0].shape != tf.TensorShape(size):
              raise ValueError(
                  "The output size does not match the the required output_size"
              )
  
imports: import numpy
  import tensorflow
  from tensorflow import distributions
  from tensorflow.python.util import nest
  from texar.tf.modules.connectors.connector_base import ConnectorBase
  from texar.tf.core import layers
  from texar.tf.utils.utils import get_function, check_or_get_instance
label_desc: Use image node_id 1 for calling a global function with example usage: _assert_same_size(outputs, output_size) without return types