def _unregister_engine(self, uid):
if len(self.targets) == <NUM_LIT:1>:<EOL><INDENT>pass<EOL><DEDENT>self.engine_stream.flush()<EOL>idx = self.targets.index(uid)<EOL>self.targets.pop(idx)<EOL>self.loads.pop(idx)<EOL>if self.pending[uid]:<EOL><INDENT>dc = ioloop.DelayedCallback(lambda : self.handle_stranded_tasks(uid), <NUM_LIT>, self.loop)<EOL>dc.start()<EOL><DEDENT>else:<EOL><INDENT>self.completed.pop(uid)<EOL>self.failed.pop(uid)<EOL><DEDENT>
Existing engine with ident `uid` became unavailable.