code: def tt_to_unfolded(factors, mode):
      """Returns the unfolding matrix of a tensor given in TT (or Tensor-Train) format
  
      Reassembles a full tensor from 'factors' and returns its unfolding matrix
      with mode given by 'mode'
  
      Parameters
      ----------
      factors: list of 3D-arrays
                TT factors
      mode: int
            unfolding matrix to be computed along this mode
  
      Returns
      -------
      2-D array
      unfolding matrix at mode given by 'mode'
      """
      return tl.unfold(tt_to_tensor(factors), mode)
  
imports: import tensorly
  from ._factorized_tensor import FactorizedTensor
  import numpy
  import warnings
label_desc: Use image node_id 3 for calling a global function with example usage: tt_to_unfolded(factors, mode) and returns: tl