def update_headers(self,fields=None):
do_reset = True<EOL>if hasattr(self, '<STR_LIT>'):<EOL><INDENT>if self.headers is not None:<EOL><INDENT>do_reset = False<EOL><DEDENT><DEDENT>if do_reset is True:<EOL><INDENT>self._reset_headers()<EOL><DEDENT>if fields is not None:<EOL><INDENT>for key,value in fields.items():<EOL><INDENT>self.headers[key] = value<EOL><DEDENT><DEDENT>header_names = "<STR_LIT:U+002C>".join(list(self.headers.keys()))<EOL>bot.debug("<STR_LIT>" %header_names)<EOL>
update headers with a token & other fields