def METHOD_NAME(self, old_bounds, new_bounds):
    initialized = (
        self._low_bound_initialized and self._high_bound_initialized
    )
    if self.range is not None and initialized:
        rangelow = self.range.low
        rangehigh = self.range.high
        d_data = rangehigh - rangelow
        old_d_screen = old_bounds[1] - old_bounds[0]
        if d_data != 0 and old_d_screen != 0:
            new_data_extent = (
                d_data / old_d_screen * (new_bounds[1] - new_bounds[0])
            )
            self.range.set_bounds(rangelow, rangelow + new_data_extent)