async def METHOD_NAME(self, amount):
    while True:
        if self._buffer.have(amount):
            return
        self._expecting = amount
        async with self._wake_up:
            await self._wake_up.wait()
        self._expecting = 0