code: def unfold(tensor, mode):
      """Returns the mode-`mode` unfolding of `tensor` with modes starting at `0`.
  
      Parameters
      ----------
      tensor : ndarray
      mode : int, default is 0
             indexing starts at 0, therefore mode is in ``range(0, tensor.ndim)``
  
      Returns
      -------
      ndarray
          unfolded_tensor of shape ``(tensor.shape[mode], -1)``
      """
      return tl.reshape(
          tl.moveaxis(tensor, mode, 0), (tensor.shape[mode], -1)
      )
  
file_path: tensorly/tensorly/base.py
imports: from math import prod
  from .None import backend
label_desc: Use image node_id 3 for calling a global function with example usage: unfold(tensor, mode) and returns: tl