Section 37E. The school committee of a city or town may employ legal counsel in connection with collective bargaining with employee organizations for school employees, and may expend money therefor from the funds appropriated by said city or town for school purposes provided, however, that no such money shall be expended in excess of twenty-five thousand dollars without the prior approval of the mayor, the city manager in a city having Plan D or Plan E form of government, or the board of selectmen. Said legal counsel shall not be subject to the provisions of section nine A of chapter thirty or the provisions of chapter thirty-one.