human
I wrote the below code

    deadline = (time.monotonic() + timeout)
    def wait():
        return spawner.server.wait_up(timeout=1, http=True)
    while (time.monotonic() < deadline):
        status = (yield spawner.poll())
        assert (status is None)
        try:
            (yield wait())
        except TimeoutError:
            continue
        else:
            break
    (yield wait())

What's a good function header?
 ... Here's a good function header?
assistant
#Here's a good function header.

@gen.coroutine
def wait_for_spawner(spawner, timeout=10):