def _validate_and_unwrap_cek(encryption_data, key_encryption_key=None, key_resolver=None):
_validate_not_none('<STR_LIT>', encryption_data.content_encryption_IV)<EOL>_validate_not_none('<STR_LIT>', encryption_data.wrapped_content_key.encrypted_key)<EOL>_validate_encryption_protocol_version(encryption_data.encryption_agent.protocol)<EOL>content_encryption_key = None<EOL>if key_resolver is not None:<EOL><INDENT>key_encryption_key = key_resolver(encryption_data.wrapped_content_key.key_id)<EOL><DEDENT>_validate_not_none('<STR_LIT>', key_encryption_key)<EOL>_validate_key_encryption_key_unwrap(key_encryption_key)<EOL>_validate_kek_id(encryption_data.wrapped_content_key.key_id, key_encryption_key.get_kid())<EOL>content_encryption_key = key_encryption_key.unwrap_key(encryption_data.wrapped_content_key.encrypted_key,<EOL>encryption_data.wrapped_content_key.algorithm)<EOL>_validate_not_none('<STR_LIT>', content_encryption_key)<EOL>return content_encryption_key<EOL>
Extracts and returns the content_encryption_key stored in the encryption_data object
and performs necessary validation on all parameters.
:param _EncryptionData encryption_data:
    The encryption metadata of the retrieved value.
:param obj key_encryption_key:
    The key_encryption_key used to unwrap the cek. Please refer to high-level service object
    instance variables for more details.
:param func key_resolver:
    A function used that, given a key_id, will return a key_encryption_key. Please refer 
    to high-level service object instance variables for more details.
:return: the content_encryption_key stored in the encryption_data object.
:rtype: bytes[]