def __getitem__(self, key):  # O(1)
        """If the item you requested already expires, KeyError will be raised."""
        self._validate_key(key)
        with self._lock:
            # Skip self._maintenance(), because it would need O(logN) time
            sequence, timestamps = self._mapping.get(self._INDEX, ([], {}))
            expires_at, created_at = timestamps[key]  # Would raise KeyError accordingly
            now = int(time.time())
            if not created_at <= now < expires_at:
                self._mapping.pop(key, None)
                timestamps.pop(key, None)
                self._mapping[self._INDEX] = sequence, timestamps
                raise KeyError("{} {}".format(
                    key,
                    "expired" if now >= expires_at else "created in the future?",
                    ))
            return self._mapping[key]  # O(1)
If the item you requested already expires, KeyError will be raised.
Solutions/CyberArkAudit/Data Connectors/.python_packages/lib/site-packages/msal/individual_cache.py