I think a graph.contains() method is needed for this library to check if certain edge or node is in the graph.