def taxi_process(ident, trips, start_time=0):  # <1>
    time = yield Event(start_time, ident, 'leave garage')  # <2>
    for i in range(trips):  # <3>
        prowling_ends = time + compute_delay(SEARCH_DURATION)  # <4>
        time = yield Event(prowling_ends, ident, 'pick up passenger')  # <5>

        trip_ends = time + compute_delay(TRIP_DURATION)  # <6>
        time = yield Event(trip_ends, ident, 'drop off passenger')  # <7>

    yield Event(time + 1, ident, 'going home')  # <8>
    # end of taxi process # <9>
# END TAXI_PROCESS

# BEGIN TAXI_SIMULATOR
Log the user out.
dataset/ETHPy150Open fluentpython/example-code/16-coroutine/taxi_sim0.py/taxi_process--crossover with--dataset/ETHPy150Open hypothesis/h/h/accounts/views.py/AuthController.logout