code: def flatten_tensors(tensors):
      """Flatten a list of tensors.
  
      Args:
          tensors (list[numpy.ndarray]): List of tensors to be flattened.
  
      Returns:
          numpy.ndarray: Flattened tensors.
  
      Example:
  
      .. testsetup::
  
          from garage.np import flatten_tensors
  
      >>> flatten_tensors([np.ndarray([1]), np.ndarray([1])])
      array(...)
  
      """
      if tensors:
          return np.concatenate([np.reshape(x, [-1]) for x in tensors])
  
      return np.asarray([])
  
file_path: garage/src/garage/np/_functions.py
imports: import warnings
  import numpy
  import scipy.signal
label_desc: Use image node_id 5 for calling a global function with example usage: flatten_tensors(tensors) and returns: np, np