def age_window_hit(by_predicted, by_truth):
    """
    calculates the window for a given truth and checks if the prediction lies within that window
    :param by_predicted: the predicted birth year
    :param by_truth: the true birth year
    :return: true if by_predicted within m-window of by_truth
    """
    m = -0.1 * by_truth + 202.8
    return int(by_truth - m) <= by_predicted <= int(by_truth + m)