<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def wrap(self, wrapping_key, key_to_wrap):
 # type: (bytes, bytes) -> bytes """Wrap key using AES keywrap. :param bytes wrapping_key: Loaded key with which to wrap :param bytes key_to_wrap: Raw key to wrap :returns: Wrapped key :rtype: bytes """

        if self.java_name not in ("AES", "AESWrap"):
            raise NotImplementedError('"wrap" is not supported by the "{}" cipher'.format(self.java_name))

        try:
            return keywrap.aes_key_wrap(wrapping_key=wrapping_key, key_to_wrap=key_to_wrap, backend=default_backend())
        except Exception:
            error_message = "Key wrap failed"
            _LOGGER.exception(error_message)
            raise WrappingError(error_message)