def mark_dead(self, connection, now=None):
<EOL>now = now if now else time.time()<EOL>try:<EOL><INDENT>self.connections.remove(connection)<EOL><DEDENT>except ValueError:<EOL><INDENT>return<EOL><DEDENT>else:<EOL><INDENT>dead_count = self.dead_count.get(connection, <NUM_LIT:0>) + <NUM_LIT:1><EOL>self.dead_count[connection] = dead_count<EOL>timeout = self.dead_timeout * <NUM_LIT:2> ** min(dead_count - <NUM_LIT:1>,<EOL>self.timeout_cutoff)<EOL>self.dead.put((now + timeout, connection))<EOL>logger.warning(<EOL>'<STR_LIT>'<EOL>'<STR_LIT>',<EOL>connection, dead_count, timeout<EOL>)<EOL><DEDENT>
Mark the connection as dead (failed). Remove it from the live pool and
put it on a timeout.

:arg connection: the failed instance