def __getitem__(self, key, with_age=False, max_age=None):
        item = collections.OrderedDict.__getitem__(self, key.casefold())
        item_age = time.time() - item[1]
        if not max_age:
            max_age = self.max_age
        if item_age < max_age:
            if with_age:
                return item[0], item_age
            else:
                return item[0]
        else:
            del self[key.casefold()]
            raise KeyError(key.casefold())
dataset/ETHPy150Open mammon-ircd/mammon/mammon/utility.py/ExpiringDict.__getitem__/original