#NEWLINE# def garbage_collect( self , ts ) : #NEWLINE# #INDENT# for qk in self . cur_windows . keys ( ) : #NEWLINE# #INDENT# if ( ( qk != 'all' ) and ( self . ref_windows [ qk ] . count ( ) == 0 ) and ( self . cur_windows [ qk ] . count ( ) == 0 ) ) : #NEWLINE# #INDENT# self . cur_windows . pop ( qk ) #NEWLINE# self . ref_windows . pop ( qk ) #NEWLINE# continue #NEWLINE# #UNINDENT# placeholder = { #NEWLINE# #INDENT# self . ts_field : ts , #NEWLINE# #UNINDENT# } #NEWLINE# if ( qk != 'all' ) : #NEWLINE# #INDENT# placeholder . update ( { #NEWLINE# #INDENT# self . rules [ 'query_key' ] : qk , #NEWLINE# #UNINDENT# } ) #NEWLINE# #UNINDENT# self . handle_event ( placeholder , 0 , qk )