def set_max_capacity(self, new_capacity):
        """
        Set or change the maximum capacity of the dictionary. Reducing
        the size of a dictionary with items already in it might result
        in items being evicted.
        
        :Parameters:
            new_capacity : int
                the new maximum capacity
        """
        self.__max_capacity = new_capacity
        if len(self) > new_capacity:
            self.__clear_to(new_capacity)
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/grizzled/grizzled/collections/dict.py/LRUDict.set_max_capacity/original