#NEWLINE# def remove_at( self , index ) : #NEWLINE# #INDENT# 'Removes item at given index' #NEWLINE# with self . lock : #NEWLINE# #INDENT# item = self . items . pop ( index ) [ 0 ] #NEWLINE# heapq . heapify ( self . items ) #NEWLINE# #UNINDENT# return item