async def METHOD_NAME():
    q = _core.UnboundedQueue()
    # If there's no-one else around, we can put stuff in and take it out
    # again, no problem
    q.put_nowait(1)
    q.put_nowait(2)
    assert q.get_batch_nowait() == [1, 2]
    result = None
    async def get_batch(q):
        nonlocal result
        result = await q.get_batch()
    # But if someone else is waiting to read, then they get dibs
    async with _core.open_nursery() as nursery:
        nursery.start_soon(get_batch, q)
        await _core.wait_all_tasks_blocked()
        q.put_nowait(3)
        q.put_nowait(4)
        with pytest.raises(_core.WouldBlock):
            q.get_batch_nowait()
    assert result == [3, 4]
    # If two tasks are trying to read, they alternate
    record = []
    async def reader(name):
        while True:
            record.append((name, await q.get_batch()))
    async with _core.open_nursery() as nursery:
        nursery.start_soon(reader, "a")
        await _core.wait_all_tasks_blocked()
        nursery.start_soon(reader, "b")
        await _core.wait_all_tasks_blocked()
        for i in range(20):
            q.put_nowait(i)
            await _core.wait_all_tasks_blocked()
        nursery.cancel_scope.cancel()
    assert record == list(zip(itertools.cycle("ab"), [[i] for i in range(20)]))