def apply_heat_recovery(enduse, heat_recovered, service, service_techs, curr_yr
    ):
    """Reduce heating demand according to assumption on heat reuse

    Arguments
    ----------
    enduse : str
        Enduse
    strategy_vars : dict
        Strategy variables
    service : dict or array
        Service of current year
    crit_dict : str
        Criteria to run function differently
    curr_yr : int
        Current year

    Returns
    -------
    service_reduced : dict or array
        Reduced service after assumption on reuse

    Note
    ----
    A standard sigmoid diffusion is assumed from base year to end year
    """
    try:
        heat_recovered_p_cy = heat_recovered[enduse][curr_yr]
        if heat_recovered_p_cy == 0:
            return service, service_techs
        else:
            service_reduced_techs = {}
            for tech, service_tech in service_techs.items():
                service_reduced_techs[tech] = service_tech * (1.0 -
                    heat_recovered_p_cy)
            service_reduced = service * (1.0 - heat_recovered_p_cy)
            return service_reduced, service_reduced_techs
    except KeyError:
        return service, service_techs
