implemented graph.getNodes(key, value)