src/graph.[ch]: Implement "graph_matches_ident".