@Override
public ElementCounter dump(SubGraph graph, Writer writer, Reporter reporter, Config config) throws Exception {
try (Transaction tx = db.beginTx()) {
GraphvizWriter graphvizWriter = new GraphvizWriter();
OutputStream os = new WriterOutputStream(writer);
graphvizWriter.emit(os, new SubgraphMappingWalkerWrapper(graph));
tx.success();
}
return reporter.getTotal();
}