#NEWLINE# def validate_string_dict( dct ) : #NEWLINE# #INDENT# 'Validate that the input is a dict with string keys and values.\n\n    Raises ValueError if not.' #NEWLINE# for ( k , v ) in dct . items ( ) : #NEWLINE# #INDENT# if ( not isinstance ( k , str ) ) : #NEWLINE# #INDENT# raise ValueError ( ( 'key %r in dict must be a string' % k ) ) #NEWLINE# #UNINDENT# if ( not isinstance ( v , str ) ) : #NEWLINE# #INDENT# raise ValueError ( ( 'value %r in dict must be a string' % v ) )