def calculate_discount(maximum: float, discount: float = 0.1):
    """
    Calculates at (1 - `discount`) * maximum
    :param maximum:
    :param discount:
    :return:
    """
    assert 0. < discount <= 1., "Discount mus be in range ]0, 1]"
    return maximum * (1. - discount)