def _manage_size(self):
        while self.capacity + self.capacity * self.threshold > len(self):
            by_counter = sorted(dict.values(self),
                                key=operator.itemgetter(2),
                                reverse=True)
            for item in by_counter[self.capacity:]:
                try:
                    del self[item[0]]
                except KeyError:
                    # if we couldn't find a key, most
                    # likely some other thread broke in
                    # on us. loop around and try again
                    break
dataset/ETHPy150Open RoseOu/flasky/venv/lib/python2.7/site-packages/sqlalchemy/util/_collections.py/LRUCache._manage_size/swapped operands of `>`