Graph Implementation In Python