def _adjust_delay(self, slot, response):
if response.status in self.retry_http_codes:<EOL><INDENT>new_delay = max(slot.delay, <NUM_LIT:1>) * <NUM_LIT:4><EOL>new_delay = max(new_delay, self.mindelay)<EOL>new_delay = min(new_delay, self.maxdelay)<EOL>slot.delay = new_delay<EOL>self.stats.inc_value('<STR_LIT>')<EOL><DEDENT>elif response.status == <NUM_LIT:200>:<EOL><INDENT>new_delay = max(slot.delay / <NUM_LIT:2>, self.mindelay)<EOL>if new_delay < <NUM_LIT>:<EOL><INDENT>new_delay = <NUM_LIT:0><EOL><DEDENT>slot.delay = new_delay<EOL><DEDENT>
Define delay adjustment policy