code: def __getitem__(self, index):
      if index == 0:
          return self.weights
      elif index == 1:
          return self.factors
      else:
          raise IndexError(
              f"You tried to access index {index} of a CP tensor.\n"
              "You can only access index 0 and 1 of a CP tensor"
              "(corresponding respectively to the weights and factors)"
          )
  
imports: from .base import FactorizedTensor
  import ivy
label_desc: Use image node_id 2 for calling the CPTensor obj's underlying member method code with example usage: obj.__getitem__(index) and returns: self, self