added python wrapper for automatically detecting communities