Quasi Clique multi-threaded in python