def __setitem__(self, item, val):
        if len(self) > self._max * 2:
            print("Purging")
            to_delete = self.most_common()[self._max:]
            for ii in to_delete:
                del self[ii]

        Counter.__setitem__(self, item, val)
dataset/ETHPy150Open Pinafore/qb/util/inspect_features.py/PurgingCounter.__setitem__/original