[graph-tool] Efficient way to get most-likely hierarchical node partition