#NEWLINE# def collect_err_and_results( result , value ) : #NEWLINE# #INDENT# ( err , results ) = result #NEWLINE# if ( not is_result_proxy ( value ) ) : #NEWLINE# #INDENT# return result #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# wait ( value ) #NEWLINE# #UNINDENT# except TaskError : #NEWLINE# #INDENT# if ( err is None ) : #NEWLINE# #INDENT# err = value #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# err = first ( err , value ) #NEWLINE# #UNINDENT# #UNINDENT# except SuspendTask : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( results is None ) : #NEWLINE# #INDENT# results = [ ] #NEWLINE# #UNINDENT# results . append ( value ) #NEWLINE# #UNINDENT# return ( err , results )