#NEWLINE# def _pack_headers( headers , add_headers = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) : #NEWLINE# #INDENT# '\n        Convert the headers from a tuple to a dictionary\n    ' #NEWLINE# header_dict = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# for header in headers : #NEWLINE# #INDENT# value = header [ 1 ] #NEWLINE# header = header [ 0 ] #NEWLINE# if ( header in IGNORE_HEADERS ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( header in add_headers ) : #NEWLINE# #INDENT# value = add_headers [ header ] #NEWLINE# #UNINDENT# #UNINDENT# header_dict [ header ] = value #NEWLINE# #UNINDENT# return header_dict