def _prune(self):
        with self._lock:
            if len(self._cache) > self._maxlen:
                L = [(t, k) for k, (t, _) in self._cache.items()]
                L.sort()

                # remove old maxlen/2 items
                for _, k in L[:2/self._maxlen]:
                    del self._cache[k]
dataset/ETHPy150Open nakamuray/blikit/blikit/models.py/Cache._prune/swapped operands of `/`