code: def __init__(self, parafac2_tensor):
      super().__init__()
  
      shape, rank = ivy.Parafac2Tensor.validate_parafac2_tensor(
          parafac2_tensor
      )
      weights, factors, projections = parafac2_tensor
  
      if weights is None:
          weights = ivy.ones(rank, dtype=factors[0].dtype)
  
      self.shape = shape
      self.rank = rank
      self.factors = factors
      self.weights = weights
      self.projections = projections
  
imports: from .base import FactorizedTensor
  import ivy
  from copy import deepcopy
label_desc: Use image node_id 1 to create a new Parafac2Tensor object from inherited base classes: FactorizedTensor with example: obj = Parafac2Tensor(parafac2_tensor)