def message_level_number(message_level):
    """ Level number from message level tag. """
    result = 0
    if message_level == "error(parsing)":
        result = 1
    if message_level == "error(2)":
        result = 2
    if message_level == "error(mac)":
        result = 2
    if message_level == "error(3)":
        result = 3
    return result