code: def _get_tensor_depth(x):
      """Returns the size of a tensor excluding the first dimension
      (typically the batch dimension).
  
      Args:
          x: A tensor.
      """
      return np.prod(x.get_shape().as_list()[1:])
  
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 2 for calling a global function with example usage: _get_tensor_depth(x) and returns: np