def ensure_no_more_than_max(self, max):
        while len(self.locators) > max:
            locator = self.locators.pop()
            del self.locators_map[locator.name]
            
        self.maxlocators = max
dataset/ETHPy150Open VisTrails/VisTrails/vistrails/core/recent_vistrails.py/RecentVistrailList.ensure_no_more_than_max/original