async def METHOD_NAME():
    async with EchoServer() as e:
        comm = await connect(e.address)
        L = []
        async def send():
            b = BatchedSend(interval=3)
            b.start(comm)
            for i in range(0, 10000, 2):
                b.send(i)
                b.send(i + 1)
                await asyncio.sleep(0.00001 * random.randint(1, 10))
        async def recv():
            while True:
                result = await wait_for(comm.read(), 1)
                L.extend(result)
                if result[-1] == 9999:
                    break
        await All([send(), recv()])
        assert L == list(range(0, 10000, 1))
        await comm.close()