Added graph degeneracy testing to the script