def tau(h, mp, p = 1):
    """ Calculates total housing taxes when choosing h

    Args:

        h (float): housing
        mp (dict): model parameters. 
        p (float): price index of housing

    Returns:

        (float): total taxes paid for a house of quality h

    """

    # Calculate assessment of home. Equation (2).
    p_tilde = p*h*mp['epsilon']
    return mp['tau_g']*p_tilde + mp['tau_p']*(max(p_tilde - mp['p_bar'], 0))