#NEWLINE# def get_finished( self ) : #NEWLINE# #INDENT# ' Clean up terminated processes and returns the list of their ids ' #NEWLINE# indices = [ ] #NEWLINE# for ( idf , v ) in self . q . items ( ) : #NEWLINE# #INDENT# if ( v . poll ( ) != None ) : #NEWLINE# #INDENT# indices . append ( idf ) #NEWLINE# #UNINDENT# #UNINDENT# for i in self : #NEWLINE# #INDENT# self . q . pop ( i ) #NEWLINE# #UNINDENT# return indices