<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def scaledBy(self, scale):
 """ Return a new Selector with scale denominators scaled by a number. """

        scaled = deepcopy(self)
    
        for test in scaled.elements[0].tests:
            if type(test.value) in (int, float):
                if test.property == 'scale-denominator':
                    test.value /= scale
                elif test.property == 'zoom':
                    test.value += log(scale)/log(2)
        
        return scaled