def time_side_effect():
    nonlocal cur_time
    if (cur_time >= 80):
        stream.keepalive = False
    cur_time += 40
    return cur_time
def time_side_effect():
    nonlocal cur_time
    if (cur_time >= 80):
        stream.keepalive = False
    cur_time += 40
    return cur_time