write_gml.py