async def progress_forever():
    """progress function that yields messages forever"""
    for i in range(1, 10):
        yield {'progress': i, 'message': f'Stage {i}'}
        # wait a long time before the next event
        await asyncio.sleep(10)
progress function that yields messages forever
jupyterhub/tests/test_api.py