verifies the specified retry data

def verify_retry_data(self, retry_data):
        '''
        verifies the specified retry data
        '''
        retry_defaults = {
                'until': True,
                'attempts': 2,
                'splay': 0,
                'interval': 30,
        }
        expected_data = {
            'until': bool,
            'attempts': int,
            'interval': int,
            'splay': int,
        }
        validated_retry_data = {}
        if isinstance(retry_data, dict):
            for expected_key, value_type in six.iteritems(expected_data):
                if expected_key in retry_data:
                    if isinstance(retry_data[expected_key], value_type):
                        validated_retry_data[expected_key] = retry_data[expected_key]
                    else:
                        log.warning(
                            'An invalid value was passed for the retry %s, '
                            'using default value \'%s\'',
                            expected_key, retry_defaults[expected_key]
                        )
                        validated_retry_data[expected_key] = retry_defaults[expected_key]
                else:
                    validated_retry_data[expected_key] = retry_defaults[expected_key]
        else:
            log.warning(('State is set to retry, but a valid dict for retry '
                         'configuration was not found.  Using retry defaults'))
            validated_retry_data = retry_defaults
        return validated_retry_data