#NEWLINE# @ timeout #NEWLINE# @ defer . inlineCallbacks #NEWLINE# def aggregate( self , pipeline , full_response = False , **kwargs ) : #NEWLINE# #INDENT# raw = ( yield self . _database . command ( 'aggregate' , self . _collection_name , pipeline = pipeline , ** full_response ) ) #NEWLINE# if full_response : #NEWLINE# #INDENT# defer . returnValue ( raw ) #NEWLINE# #UNINDENT# defer . returnValue ( raw . get ( 'result' ) )