#NEWLINE# @ staticmethod #NEWLINE# def run_resolve_fn( resolver , original_resolver ) : #NEWLINE# #INDENT# result = resolver ( ) #NEWLINE# if ( isinstance ( result , Future ) or iscoroutine ( result ) ) : #NEWLINE# #INDENT# future = ensure_future ( result ) #NEWLINE# d = Deferred ( ) #NEWLINE# future . add_done_callback ( process_future_result ( d ) ) #NEWLINE# return d #NEWLINE# #UNINDENT# return result