How To Implement Graphs In Python