def get_book_message_type(message):
    """Reads raw orderbook channel messages and extracts the message type and
    message body"""
    if isinstance(message, list) and message[1] == 'hb':
        message_type = 'hb'
    elif isinstance(message, list) and isinstance(message[1][0], list):
        message_type = 'snapshot'
    elif isinstance(message, list) and len(message[1]) >= 2:
        message_type = 'update'
    else:
        message_type = message['event']
    return message_type, message
