def write_headers(self, fp, headers, mute=None):
if headers:<EOL><INDENT>if not mute:<EOL><INDENT>mute = []<EOL><DEDENT>fmt = '<STR_LIT>' % (max(len(k) for k in headers) + <NUM_LIT:1>)<EOL>for key in sorted(headers):<EOL><INDENT>if key in mute:<EOL><INDENT>continue<EOL><DEDENT>fp.write(fmt % (key.title() + '<STR_LIT::>', headers[key]))<EOL><DEDENT>fp.flush()<EOL><DEDENT>
Convenience function to output headers in a formatted fashion
to a file-like fp, optionally muting any headers in the mute
list.