async def _ping_pong_loop(self, ws: aiohttp.ClientWebSocketResponse): while True: ping_send_time = time.time() await ws.ping() await asyncio.sleep(CONSTANTS.WS_PING_HEARTBEAT) if self._last_recv_time < ping_send_time: ws._pong_not_received() raise asyncio.TimeoutError