#NEWLINE# def _validate_headers( headers ) : #NEWLINE# #INDENT# for ( key , value ) in headers . items ( ) : #NEWLINE# #INDENT# if ( not isinstance ( key , basestring ) ) : #NEWLINE# #INDENT# raise ValueError ( ( 'Expected key %r of headers to be a string' % ( key , ) ) ) #NEWLINE# #UNINDENT# if ( not isinstance ( value , basestring ) ) : #NEWLINE# #INDENT# raise ValueError ( ( 'Expected value %r of headers (associated with key %r) to be a string' % ( key , key ) ) ) #NEWLINE# #UNINDENT# #UNINDENT# return headers