#NEWLINE# def aggregate( self ) : #NEWLINE# #INDENT# ' Perform aggregation and return response. ' #NEWLINE# from nefertari.elasticsearch import ES #NEWLINE# aggregations_params = self . pop_aggregations_params ( ) #NEWLINE# if self . view . _auth_enabled : #NEWLINE# #INDENT# self . check_aggregations_privacy ( aggregations_params ) #NEWLINE# #UNINDENT# self . stub_wrappers ( ) #NEWLINE# return ES ( self . view . Model . __name__ ) . aggregate ( _aggregations_params = aggregations_params , ** self . _query_params )