def METHOD_NAME(mod, time, time_from_arrival, site):
    num_teams_en_route = 0
    if time > 0 and time_from_arrival + 1 < mod.time_horizon:
        num_teams_en_route += \
            mod.is_time_from_arrival[time - 1, time_from_arrival + 1, site]
    for d in mod.depots:
        if mod.from_depot_travel_times[time, d, site] == time_from_arrival:
            num_teams_en_route += mod.depot_departures[time, d, site]
    for s in mod.sites:
        if mod.inter_site_travel_times[time, s, site] == time_from_arrival:
            num_teams_en_route += mod.site_departures[time, s, site]
    return (
        mod.is_time_from_arrival[time, time_from_arrival, site]
        == num_teams_en_route
    )