<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _reset_bbox(self):
 """This function should only be called internally. It resets the viewers bounding box based on changes to pan or scale. """

        scale_x, scale_y = self.get_scale_xy()
        pan_x, pan_y = self.get_pan(coord='data')[:2]
        win_wd, win_ht = self.get_window_size()
        # NOTE: need to set at least a minimum 1-pixel dimension on
        # the window or we get a scale calculation exception. See github
        # issue 431
        win_wd, win_ht = max(1, win_wd), max(1, win_ht)

        self._calc_bg_dimensions(scale_x, scale_y,
                                 pan_x, pan_y, win_wd, win_ht)