async def METHOD_NAME(c, s, a, b):
    ms = MemorySampler()
    async with ms.sample("foo", measure="managed", interval=0.1):
        f = c.submit(lambda: 1)
        await f
        await asyncio.sleep(0.5)
    assert ms.samples["foo"][0][1] == 0
    assert ms.samples["foo"][-1][1] > 0
    # Test that there is no server-side memory leak
    assert not s.extensions["memory_sampler"].samples