'Handler for a retry.
Intended to be hooked up to an event handler (hence the **kwargs),
this will process retries appropriately.'

def __call__(self, attempts, response, caught_exception, **kwargs):

    if self._checker(attempts, response, caught_exception):
        result = self._action(attempts=attempts)
        logger.debug('Retry    needed,    action    of:    %s', result)
        return result
    logger.debug('No    retry    needed.')
