code: def __init__(self, factors, inplace=False):
      super().__init__()
  
      # Will raise an error if invalid
      shape, rank = _validate_tt_matrix(factors)
  
      self.shape = tuple(shape)
      self.order = len(self.shape) // 2
      self.left_shape = self.shape[: self.order]
      self.right_shape = self.shape[self.order :]
      self.rank = tuple(rank)
      self.factors = factors
  
imports: import tensorly
  from .tenalg import _tt_matrix_to_tensor
  from ._factorized_tensor import FactorizedTensor
  import numpy
label_desc: Use image node_id 1 to create a new TTMatrix object from inherited base classes: FactorizedTensor with example: obj = TTMatrix(factors, inplace)