code: def _compute_projections(tensor_slices, factors, svd):
      n_eig = factors[0].shape[1]
      out = []
  
      for A, tensor_slice in zip(factors[0], tensor_slices):
          lhs = T.dot(factors[1], T.transpose(A * factors[2]))
          rhs = T.transpose(tensor_slice)
          U, _, Vh = svd_interface(
              T.dot(lhs, rhs),
              n_eigenvecs=n_eig,
              method=svd,
              flip_sign=False,
          )
  
          out.append(T.transpose(T.dot(U, Vh)))
  
      return out
  
imports: from warnings import warn
  from typing import Iterable
  import tensorly
  from ._base_decomposition import DecompositionMixin
  from tensorly.random import random_parafac2
  from tensorly import backend
  from .None import parafac, non_negative_parafac_hals
  from ..parafac2_tensor import Parafac2Tensor, _validate_parafac2_tensor
  from ..cp_tensor import CPTensor, cp_normalize
  from ..tenalg.svd import svd_interface
label_desc: Use image node_id 2 for calling a global function with example usage: _compute_projections(tensor_slices, factors, svd) and returns: out