def write(self, fd=sys.stdout):
print(self.header.getvalue(), file=fd)<EOL>print(self.imports.getvalue(), file=fd)<EOL>print('<STR_LIT>', end='<STR_LIT:U+0020>', file=fd)<EOL>for m in self.messages:<EOL><INDENT>print(m, file=fd)<EOL><DEDENT>print('<STR_LIT>', file=fd)<EOL>print('<STR_LIT>', file=fd)<EOL>print('<STR_LIT>', file=fd)<EOL>for k,v in list(self._services.items()):<EOL><INDENT>print(v.classdef.getvalue(), file=fd)<EOL>print(v.initdef.getvalue(), file=fd)<EOL>for s in v.methods:<EOL><INDENT>print(s.getvalue(), file=fd)<EOL><DEDENT><DEDENT>
write out to file descriptor, 
        should not need to override.