if len(n.children) == 1:
raise TreeError("No support for single descedent nodes")
else:
tip_info = [(max(c.MaxDistTips), c) for c in n.children]
dists = [i[0][0] for i in tip_info]
best_idx = np.argsort(dists)[-2:]
tip_a, child_a = tip_info[best_idx[0]]
After Change
tip_info = []
for c in n.children:
(left_d, _), (right_d, _) = c.MaxDistTips
best_idx = np.argmax([left_d, right_d])
tip_info.append((c.MaxDistTips[best_idx], c))
dists = [i[0][0] for i in tip_info]
best_idx = np.argsort(dists)[-2:]