Serialization code for nodes and connections (which is all you need to rebuild the graph)