def METHOD_NAME(self, start: int, end: int):
    if start == end:
        return
    x_center = self.view_rect().x() + self.view_rect().width() / 2
    y_factor = self.view_rect().height() / (end - start)
    self.scale(1, y_factor)
    self.centerOn(x_center, start + (end - start) / 2)
    self.y_scale_changed.emit(y_factor)