Replacing Cliquer with NetworkX