Clustering phylogenetic trees with python