def get_maj_answer(votes_per_answer):
    """
    :param votes_per_answer: dictionary with {'1': int, '2': int}, where the ints add up to NBR_ANNOTATORS
    :return: the majority answers, i.e., number of votes at least half that of the number of annotators;
     raises error if the answers are tied
    """
    if (len(votes_per_answer) == 1 and '1' in votes_per_answer) or \
            (len(votes_per_answer) == 2 and votes_per_answer['1'] > votes_per_answer['2']):
        return '1'
    elif (len(votes_per_answer) == 1 and '2' in votes_per_answer) or \
            (len(votes_per_answer) == 2 and votes_per_answer['2'] > votes_per_answer['1']):
        return '2'
    else:
        raise ValueError("The answers are equally often selected."
                         " This should have been impossible with the setup of the study.")