#NEWLINE# def _data_is_binary( self , data ) : #NEWLINE# #INDENT# 'Check if the data contains binary components.' #NEWLINE# if isinstance ( data , six . binary_type ) : #NEWLINE# #INDENT# return True #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if isinstance ( data , list ) : #NEWLINE# #INDENT# return functools . reduce ( ( lambda a , b : ( a or b ) ) , [ self . _data_is_binary ( self ) for item in data ] , False ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if isinstance ( data , dict ) : #NEWLINE# #INDENT# return functools . reduce ( ( lambda a , b : ( a or b ) ) , [ self . _data_is_binary ( item ) for item in six . itervalues ( data ) ] , False ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return False