def _retry(self):
notifications_to_delete = []<EOL>for notification_id in self.notifications:<EOL><INDENT>if datetime.datetime.utcnow() > self.notifications[notification_id]['<STR_LIT>'] + self._wait_period:<EOL><INDENT>self._notify_receiver(<EOL>self.notifications[notification_id]['<STR_LIT>'],<EOL>self.notifications[notification_id]['<STR_LIT>'],<EOL>self.notifications[notification_id]['<STR_LIT>'])<EOL>if self.notifications[notification_id]['<STR_LIT>'] >= self._max_attempts - <NUM_LIT:1>:<EOL><INDENT>notifications_to_delete.append(notification_id)<EOL><DEDENT>else:<EOL><INDENT>self.notifications[notification_id]['<STR_LIT>'] = datetime.datetime.utcnow()<EOL>self.notifications[notification_id]['<STR_LIT>'] += <NUM_LIT:1><EOL><DEDENT><DEDENT><DEDENT>for notification_id in notifications_to_delete:<EOL><INDENT>del self.notifications[notification_id]<EOL><DEDENT>
Deal with unacknowledged notifications.