extract out pet_value_bounds_apply to a separate file