def handle_events(self, events):
        for sock, fd, event in events:
            if sock == self._local_sock:
                self._handle_local(sock)
            elif sock == self._remote_sock:
                self._handle_remote(sock)
        now = time.time()
        if now - self._last_time > CACHE_TIMEOUT / 2:
            self._id_to_addr.sweep()
dataset/ETHPy150Open shadowsocks/ShadowDNS/shadowdns/dnsrelay.py/UDPDNSRelay.handle_events/original