async def METHOD_NAME(caplog):
    loop = asyncio.get_event_loop()
    caplog.set_level(logging.DEBUG)
    q = SmartQueue(async_iter([1, 2, 3]))
    async def invalid_worker(q):
        print("w start")
        with q.new_consumer() as c:
            async for item in c:
                print("item =", item.data)
        print("w end")
    try:
        task = loop.create_task(invalid_worker(q))
        await asyncio.wait_for(task, timeout=1)
    except asyncio.TimeoutError:
        task.cancel()
        try:
            await task
        except asyncio.CancelledError:
            pass
    outputs = set()
    print("w start", q.stats())
    with q.new_consumer() as c:
        async for item in c:
            print("item2 =", item.data)
            assert c.current_item == item.data
            outputs.add(item.data)
            await q.mark_done(item)
    print("w end")
    assert outputs == {1, 2, 3}
    await q.close()