Implement the Graph protocol for adjacency list based graphs