code: def _get_vector_event_shape(model):
      """Returns the size of the vector corresponding to the flattened event."""
      event_sizes = tf.nest.map_structure(
          ps.reduce_prod, model.event_shape
      )
      return tf.TensorShape([sum(tf.nest.flatten(event_sizes))])
  
file_path: probability/spinoffs/inference_gym/inference_gym/targets/vector_model.py
imports: import collections
  import functools
  import tensorflow.compat.v2
  import tensorflow_probability
  from tensorflow_probability.python.internal import prefer_static
  from inference_gym.targets import model
  from tensorflow.python.util import nest
label_desc: Use image node_id 4 for calling a global function with example usage: _get_vector_event_shape(model) and returns: tf