import asyncio

class VTEvent(asyncio.Condition):
    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)
        self.data = None

    def notify(self, n=1, *args):
        self.data = args
        super().notify(n)
    
    def notify_all(self, *args):
        self.data = args
        super().notify_all()
    
    async def wait(self):
        await super().wait()
        return self.data
    
    async def wait_for(self, predicate):
        await super().wait_for(predicate)
        return self.data
