code: def flatten_batch(t, name="flatten_batch"):
      """Flatten a batch of observations.
  
      Reshape a tensor of size (X, Y, Z) into (X*Y, Z)
  
      Args:
          t (tf.Tensor): Tensor to flatten.
          name (string): Name of the operation.
  
      Returns:
          tf.Tensor: Flattened tensor.
      """
      return tf.reshape(t, [-1] + list(t.shape[2:]), name=name)
  
imports: import collections
  import numpy
  import tensorflow
label_desc: Use image node_id 3 for calling a global function with example usage: flatten_batch(t, name) and returns: tf