code: def flatten_batch(tensor):
      """Flatten a batch of observations.
  
      Reshape a tensor of size (X, Y, Z) into (X*Y, Z)
  
      Args:
          tensor (torch.Tensor): Tensor to flatten.
  
      Returns:
          torch.Tensor: Flattened tensor.
  
      """
      return tensor.reshape((-1,) + tensor.shape[2:])
  
imports: import copy
  import math
  import warnings
  import torch
  from torch import nn
  import torch.nn.functional
label_desc: Use image node_id 9 for calling a global function with example usage: flatten_batch(tensor) and returns: tensor