def __getitem__(self, key):
        try:
            value_record = super(NearCache, self).__getitem__(key)
            if value_record.is_expired(self.max_idle_seconds):
                super(NearCache, self).__delitem__(key)
                raise KeyError
        except __HOLE__ as ke:
            self._cache_miss += 1
            raise ke

        if self.eviction_policy == EVICTION_POLICY.LRU:
            value_record.last_access_time = current_time()
        elif self.eviction_policy == EVICTION_POLICY.LFU:
            value_record.access_hit += 1
        self._cache_hit += 1
        return self.serialization_service.to_object(value_record.value) \
            if self.in_memory_format == IN_MEMORY_FORMAT.BINARY else value_record.value
dataset/ETHPy150Open hazelcast/hazelcast-python-client/hazelcast/near_cache.py/NearCache.__getitem__