#NEWLINE# def validate_read_preference( dummy , value ) : #NEWLINE# #INDENT# 'Validate a read preference.\n    ' #NEWLINE# if ( not isinstance ( value , _ServerMode ) ) : #NEWLINE# #INDENT# raise TypeError ( ( '%r is not a read preference.' % ( value , ) ) ) #NEWLINE# #UNINDENT# return value