'Decode serialized data.
Deserialize a data stream as serialized using `dumps`
based on `content_type`.
Arguments:
data (bytes, buffer, str): The message data to deserialize.
content_type (str): The content-type of the data.
(e.g., `application/json`).
content_encoding (str): The content-encoding of the data.
(e.g., `utf-8`, `binary`, or `us-ascii`).
accept (Set): List of content-types to accept.
Raises:
ContentDisallowed: If the content-type is not accepted.
Returns:
Any: The unserialized data.'

def loads(self, data, content_type, content_encoding, accept=None, force=False, _trusted_content=TRUSTED_CONTENT):

    content_type = (bytes_to_str(content_type) if content_type else u'application/data')
    if (accept is not None):
        if ((content_type not in _trusted_content) and (content_type not in accept)):
            raise self._for_untrusted_content(content_type, u'untrusted')
    elif ((content_type in self._disabled_content_types) and (not force)):
        raise self._for_untrusted_content(content_type, u'disabled')
    content_encoding = (content_encoding or u'utf-8').lower()
    if data:
        decode = self._decoders.get(content_type)
        if decode:
            with _reraise_errors(DecodeError):
                return decode(data)
        if ((content_encoding not in SKIP_DECODE) and (not isinstance(data, text_t))):
            with _reraise_errors(DecodeError):
                return _decode(data, content_encoding)
    return data
