def cancel(tasks: Iterable["asyncio.Future[Any]"]) -> None:
    """asyncio signal handler that cancels all `tasks` and reports to stderr."""
    err("Aborted!")
    for task in tasks:
        task.cancel()
asyncio signal handler that cancels all `tasks` and reports to stderr.
src/black/concurrency.py