Section 4C. Whenever the commissioner provides any service under the provisions of section four, four A or four B, the costs of such services shall be incurred by the commonwealth; and payment therefor shall be deducted by the state treasurer under the provisions of section twenty A of chapter fifty-eight from any amount distributable or payable by the commonwealth to such city or town.

Whenever, in the opinion of the commissioner, it is necessary for an assessor to attend any training program under the provisions of section three, the registration fees, costs of study material and necessary travel expense shall be paid by the city, town or district of such assessor.