#NEWLINE# def _remove_active_facets( request , search_results ) : #NEWLINE# #INDENT# facets = request . GET . getlist ( 'facet' , [ ] ) #NEWLINE# for facet in search_results [ 'facets' ] : #NEWLINE# #INDENT# new_counts = [ ] #NEWLINE# for count in facet [ 'counts' ] : #NEWLINE# #INDENT# if ( ( '%s:%s' % ( facet [ 'name' ] , count [ 'name' ] ) ) not in facets ) : #NEWLINE# #INDENT# new_counts . append ( facets ) #NEWLINE# #UNINDENT# #UNINDENT# facet [ 'counts' ] = new_counts #NEWLINE# #UNINDENT# return search_results