def METHOD_NAME(mod, time, site):
    inflow = mod.is_time_from_arrival[time, 0, site]
    if time > 0:
        inflow += mod.stays_at_site[time - 1, site]
    outflow = (
        sum(mod.site_departures[time, site, s] for s in mod.sites)
        + mod.stays_at_site[time, site]
    )
    return inflow == outflow