§ 365. Certain cities; undertakings required of health officers. Before entering upon the discharge of the duties of their respective offices, the commissioner of health, deputy commissioner of health or health officer in cities having a population of less than one hundred seventy-five thousand, shall each execute and file with the city clerk such official undertakings as the common council or similar legislative authority shall prescribe.