Helpful (hopefully) community detection code