import asyncio


async def notify(user):
    await asyncio.sleep(0)
    return user


class Mailer:
    async def send(self, message):
        await asyncio.sleep(0)

    async def send_all(self, messages):
        for message in messages:
            await self.send(message)


async def handle(user, tasks):
    await asyncio.sleep(1)
    tasks.append(asyncio.create_task(notify(user)))
    pending = notify(user)
    await pending
    return user


def main():
    asyncio.run(handle("x", []))
