Section 10. Two or more towns may unite in forming an inspection district, the expense thereof to be paid on such basis as may be agreed upon by the boards of health thereof.