Use `asyncio.wait_for(future, timeout)` after https://github.com/pyodide/pyodide/pull/2022 is merged and released.