python graph impl. with a-star pathfinding