import asyncio


async def wait_for_event(evt, timeout): # pylint: disable=invalid-name
    """Wait for an event with a timeout"""
    try:
        await asyncio.wait_for(evt.wait(), timeout)
    except asyncio.TimeoutError:
        pass

    return evt.is_set()