Whenever a local board or department of health, either municipal or county, willfully neglects or refuses to comply with this part, and it is apparent that an epidemic of a communicable disease is threatened to invade other municipalities or counties, it then becomes the duty of the state department of health to carry out this part in such municipality or county, as the case may be, and the necessary expense incurred by the department of health in carrying out these provisions shall be paid by the respective municipality or county, as the case may be, to the commissioner of finance and administration, and the commissioner shall place the payment to the credit of the department.