code: def get_likelihood(self, uni_matrix):
          
          uni_dim = uni_matrix.shape[1]
          num_edge = len(self.edges)
          values = np.zeros([1, num_edge])
          new_uni_matrix = np.empty([uni_dim, uni_dim])
  
          for i in range(num_edge):
              edge = self.edges[i]
              value, left_u, right_u = edge.get_likelihood(uni_matrix)
              new_uni_matrix[edge.L, edge.R] = left_u
              new_uni_matrix[edge.R, edge.L] = right_u
              values[0, i] = np.log(value)
  
          return np.sum(values), new_uni_matrix
docs: Compute likelihood of the tree given an U matrix.
  
          Args:
              uni_matrix(numpy.array): univariate matrix to evaluate likelihood on.
  
          Returns:
              tuple[float, numpy.array]:
                  likelihood of the current tree, next level conditional univariate matrix