#NEWLINE# def deprecated_match_fingerprints( newly_inferred_events , expected_internal_events ) : #NEWLINE# #INDENT# ' Deprecated. ' #NEWLINE# expected_internal_events . reverse ( ) #NEWLINE# inferred_fingerprints = set ( [ e . fingerprint for e in newly_inferred_events ] ) #NEWLINE# if ( len ( inferred_fingerprints ) != len ( newly_inferred_events ) ) : #NEWLINE# #INDENT# log . warn ( ( 'Overlapping fingerprints in peek() (%d unique, %d total)' % ( len ( inferred_fingerprints ) , len ( newly_inferred_events ) ) ) ) #NEWLINE# #UNINDENT# expected_fingerprints = set ( [ e . fingerprint for e in expected_internal_events ] ) #NEWLINE# if ( len ( expected_fingerprints ) != len ( expected_internal_events ) ) : #NEWLINE# #INDENT# log . warn ( ( 'Overlapping expected fingerprints (%d unique, %d total)' % ( len ( expected_fingerprints ) , len ( expected_internal_events ) ) ) ) #NEWLINE# #UNINDENT# for expected in expected_internal_events : #NEWLINE# #INDENT# if ( expected . fingerprint in inferred_fingerprints ) : #NEWLINE# #INDENT# expected_internal_events = [ newly_inferred_events for e in expected_internal_events if ( e . fingerprint == expected . fingerprint ) ] #NEWLINE# instance_of_expected = len ( expected_internal_events ) #NEWLINE# observed_instance = 0 #NEWLINE# idx_of_last_observed_instance = ( - 1 ) #NEWLINE# parent_index = ( - 1 ) #NEWLINE# for ( index , event ) in enumerate ( newly_inferred_events ) : #NEWLINE# #INDENT# if ( event . fingerprint == expected . fingerprint ) : #NEWLINE# #INDENT# observed_instance += 1 #NEWLINE# idx_of_last_observed_instance = index #NEWLINE# if ( observed_instance == instance_of_expected ) : #NEWLINE# #INDENT# parent_index = index #NEWLINE# break #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# if ( parent_index == ( - 1 ) ) : #NEWLINE# #INDENT# log . warn ( ( 'There were fewer instances of inferred %s fingerprint than expected %s ' % ( str ( newly_inferred_events ) , str ( expected_internal_events ) ) ) ) #NEWLINE# parent_index = idx_of_last_observed_instance #NEWLINE# #UNINDENT# newly_inferred_events = newly_inferred_events [ : ( parent_index + 1 ) ] #NEWLINE# return newly_inferred_events #NEWLINE# #UNINDENT# #UNINDENT# return [ ]