Each school district created by merger with other districts shall provide for the payment of debts created by school districts, or other school organizations, superseded by the merged district, when such debts have been incurred in the erection of schoolhouses or for other school purposes. If any portion of such debt is in the form of bonds, if issued for a valuable consideration, the holder or holders thereof, upon surrendering the same to the school board or board of education, shall have the right to demand, and the board in the name of the merged district shall cause to be issued, other bonds of like amount and of like tenor and effect as to payment of principal and interest as the bonds surrendered. This provision shall also apply to cases when only a part of a district is embraced within the merged district whenever the fractional part becomes a part of the merged district. The merged district shall assume and pay only such proportion of debt of divided districts as the taxable valuation of the part taken bears to the taxable valuation of the whole district. This section applies to Class IV and V districts only.