def load_class_labels(class_map_file):
    """
    Loads the labels from the class map file and stores them
    in a dictionary with their label index as the key.

    :param class_map_file: the file with the class map (label<TAB>index)
    :type class_map_file: str
    :return: the label dictionary
    :rtype: dict
    """
    result = {}
    with open(class_map_file, 'r') as map:
        for line in map.readlines():
            label, num = line.split("\t")
            result[int(num)] = label
    return result