Community detection demo/tutorial code