code: def tt_matrix_to_unfolded(tt_matrix, mode):
      """Returns the unfolding matrix of a tensor given in TT-Matrix format
  
      Reassembles a full tensor from 'factors' and returns its unfolding matrix
      with mode given by 'mode'
  
      Parameters
      ----------
      factors : list of 3D-arrays
          TT-Matrix 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_matrix_to_tensor(tt_matrix), mode)
  
imports: import tensorly
  from .tenalg import _tt_matrix_to_tensor
  from ._factorized_tensor import FactorizedTensor
  import numpy
label_desc: Use image node_id 4 for calling a global function with example usage: tt_matrix_to_unfolded(tt_matrix, mode) and returns: tl