code: def vec_to_tensor(vec, shape):
      """Folds a vectorised tensor back into a tensor of shape `shape`
  
      Parameters
      ----------
      vec : 1D-array
          vectorised tensor of shape ``(i_1 * i_2 * ... * i_n)``
      shape : tuple
          shape of the ful tensor
  
      Returns
      -------
      ndarray
          tensor of shape `shape` = ``(i_1, ..., i_n)``
      """
      return tl.reshape(vec, shape)
  
file_path: tensorly/tensorly/base.py
imports: from math import prod
  from .None import backend
label_desc: Use image node_id 2 for calling a global function with example usage: vec_to_tensor(vec, shape) and returns: tl