def clusters_at_height(root, height):
 lower = set()
 cluster_list = []
 for cl in preorder(root):
  if (cl in lower):
   continue
  if (cl.value.height < height):
   cluster_list.append(cl)
   lower.update(preorder(cl))
 return cluster_list

def clusters_at_height ( root , height ) : lower = set ( ) cluster_list = [ ] for cl in preorder ( root ) : if ( cl in lower ) : continue if ( cl . value . height < height ) : cluster_list . append ( cl ) lower . update ( preorder ( cl ) ) return cluster_list
return a list of clusters by cutting the clustering at height .