First community detection algorithm in Python