can i use python to do graph theory