in later/task.py [0:0]
def __init__(self, *, cancel_timeout: float = 300, context: bool = False) -> None:
"""
cancel_timeout is the time in seconds we will wait after cancelling all
the tasks watched by this watcher.
context is wether to expose this Watcher via contextvars now or at __aenter__
"""
if context:
WATCHER_CONTEXT.set(self)
self._cancel_timeout = cancel_timeout
self._tasks = {}
self._scheduled = []
self._tasks_changed = BiDirectionalEvent()
self._cancelled = asyncio.Event()
self._preexit_callbacks = []
self._shielded_tasks = {}
self.running = False