#NEWLINE# def execute( self , result , callback = None ) : #NEWLINE# #INDENT# if self . is_async ( ) : #NEWLINE# #INDENT# result = async ( result ) #NEWLINE# if callback : #NEWLINE# #INDENT# return result . add_callback ( callback ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return result #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if isgenerator ( result ) : #NEWLINE# #INDENT# result = execute_generator ( result ) #NEWLINE# #UNINDENT# return ( callback ( result ) if callback else result )