Graph.write_relation method should be private