python graph implementation to be used to perform graph algorithms