Refactored Graphviz code sample.