<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _encrypt_data_key(self, data_key, algorithm, encryption_context):
 """Performs the provider-specific key encryption actions. :param data_key: Unencrypted data key :type data_key: :class:`aws_encryption_sdk.structures.RawDataKey` or :class:`aws_encryption_sdk.structures.DataKey` :param algorithm: Algorithm object which directs how this Master Key will encrypt the data key :type algorithm: aws_encryption_sdk.identifiers.Algorithm :param dict encryption_context: Encryption context to use in encryption :returns: Decrypted data key :rtype: aws_encryption_sdk.structures.EncryptedDataKey :raises EncryptKeyError: if Master Key is unable to encrypt data key """

        # Raw key string to EncryptedData
        encrypted_wrapped_key = self.config.wrapping_key.encrypt(
            plaintext_data_key=data_key.data_key, encryption_context=encryption_context
        )
        # EncryptedData to EncryptedDataKey
        return aws_encryption_sdk.internal.formatting.serialize.serialize_wrapped_key(
            key_provider=self.key_provider,
            wrapping_algorithm=self.config.wrapping_key.wrapping_algorithm,
            wrapping_key_id=self.key_id,
            encrypted_wrapped_key=encrypted_wrapped_key,
        )