Graphs: support for a preprocessing hook