'Decodes a native protocol message body
:param protocol_version: version to use decoding contents
:param user_type_map: map[keyspace name] = map[type name] = custom type to instantiate when deserializing this type
:param stream_id: native protocol stream id from the frame header
:param flags: native protocol flags bitmap from the header
:param opcode: native protocol opcode from the header
:param body: frame body
:param decompressor: optional decompression function to inflate the body
:return: a message decoded from the body and frame attributes'

@classmethod
def decode_message(cls, protocol_version, user_type_map, stream_id, flags, opcode, body, decompressor, result_metadata):

    if (flags & COMPRESSED_FLAG):
        if (decompressor is None):
            raise RuntimeError('No    de-compressor    available    for    compressed    frame!')
        body = decompressor(body)
        flags ^= COMPRESSED_FLAG
    body = io.BytesIO(body)
    if (flags & TRACING_FLAG):
        trace_id = UUID(bytes=body.read(16))
        flags ^= TRACING_FLAG
    else:
        trace_id = None
    if (flags & WARNING_FLAG):
        warnings = read_stringlist(body)
        flags ^= WARNING_FLAG
    else:
        warnings = None
    if (flags & CUSTOM_PAYLOAD_FLAG):
        custom_payload = read_bytesmap(body)
        flags ^= CUSTOM_PAYLOAD_FLAG
    else:
        custom_payload = None
    flags &= USE_BETA_MASK
    if flags:
        log.warning('Unknown    protocol    flags    set:    %02x.    May    cause    problems.', flags)
    msg_class = cls.message_types_by_opcode[opcode]
    msg = msg_class.recv_body(body, protocol_version, user_type_map, result_metadata)
    msg.stream_id = stream_id
    msg.trace_id = trace_id
    msg.custom_payload = custom_payload
    msg.warnings = warnings
    if msg.warnings:
        for w in msg.warnings:
            log.warning('Server    warning:    %s', w)
    return msg
