update graphviz/writer.py for new models structure