def calculate_error_rates(point_to_weight, classifier_to_misclassified):
    """Given a dictionary mapping training points to their weights, and another
    dictionary mapping classifiers to the training points they misclassify,
    returns a dictionary mapping classifiers to their error rates."""
    error_rates = {}
    for classifier in classifier_to_misclassified:
        error_rate = 0
        for point in classifier_to_misclassified[classifier]:
            error_rate += point_to_weight[point]
        error_rates[classifier] = error_rate
    return error_rates
    raise NotImplementedError