def block_until_stream_is_ready(query, min_batches=2):
    import time
    while (len(query.recentProgress) < min_batches):
        time.sleep(5)
    print(f'The stream has processed {len(query.recentProgress)} batchs')
def block_until_stream_is_ready(query, min_batches=2):
    import time
    while (len(query.recentProgress) < min_batches):
        time.sleep(5)
    print(f'The stream has processed {len(query.recentProgress)} batchs')