code: def get_tau_matrix(self):
          
          num_edges = len(self.edges)
          tau = np.empty([num_edges, num_edges])
  
          for i in range(num_edges):
              edge = self.edges[i]
              for j in edge.neighbors:
                  if self.level == 1:
                      left_u = self.u_matrix[:, edge.L]
                      right_u = self.u_matrix[:, edge.R]
  
                  else:
                      left_parent, right_parent = edge.parents
                      left_u, right_u = Edge.get_conditional_uni(left_parent, right_parent)
  
                  tau[i, j], pvalue = scipy.stats.kendalltau(left_u, right_u)
  
          return tau
docs: Get tau matrix for adjacent pairs.
  
          Returns:
              :param tau: tau matrix for the current tree
              :type tau: np.ndarray