code: def symeig_svd(matrix, n_eigenvecs=None, **kwargs):
      """Computes a truncated SVD on `matrix` using symeig
  
          Uses symeig on matrix.T.dot(matrix) or its transpose
  
      Parameters
      ----------
      matrix : 2D-array
      n_eigenvecs : int, optional, default is None
          if specified, number of eigen[vectors-values] to return
      **kwargs : optional
          kwargs are used to absorb the difference of parameters among the other SVD functions
  
      Returns
      -------
      U : 2D-array
          of shape (matrix.shape[0], n_eigenvecs)
          contains the right singular vectors
      S : 1D-array
          of shape (n_eigenvecs, )
          contains the singular values of `matrix`
      V : 2D-array
          of shape (n_eigenvecs, matrix.shape[1])
          contains the left singular vectors
      """
      n_eigenvecs, _, _ = svd_checks(matrix, n_eigenvecs=n_eigenvecs)
  
      dim_1, dim_2 = tl.shape(matrix)
  
      if dim_1 > dim_2:
          S, U = tl.eigh(tl.dot(matrix, tl.transpose(matrix)))
          S = tl.sqrt(tl.clip(S, tl.eps(S.dtype)))
          V = tl.dot(tl.transpose(matrix), U / tl.reshape(S, (1, -1)))
      else:
          S, V = tl.eigh(tl.dot(tl.transpose(matrix), matrix))
          S = tl.sqrt(tl.clip(S, tl.eps(S.dtype)))
          U = tl.dot(matrix, V) / tl.reshape(S, (1, -1))
  
      U, S, V = (
          tl.flip(U, axis=1),
          tl.flip(S),
          tl.flip(tl.transpose(V), axis=0),
      )
      return (
          U[:, : min(dim_1, n_eigenvecs)],
          S[: min(dim_1, dim_2, n_eigenvecs)],
          V[: min(dim_2, n_eigenvecs), :],
      )
  
file_path: tensorly/tensorly/tenalg/svd.py
imports: import warnings
  import tensorly
  from .proximal import soft_thresholding
label_desc: Use image node_id 6 for calling a global function with example usage: symeig_svd(matrix, n_eigenvecs) and returns: U,  S,  V