def save(self, fname):
out = etree.tostring(self.root, xml_declaration=True,<EOL>standalone=True,<EOL>pretty_print=True)<EOL>with open(fname, '<STR_LIT:wb>') as fid:<EOL><INDENT>fid.write(out)<EOL><DEDENT>
Save figure to a file