The county legislative bodies and the city officials, or other boards of the incorporated towns or cities, are empowered to provide suitable places for the detention of persons who may be subjected to isolation or quarantine and who should be segregated under this chapter. County legislative bodies and governing boards of incorporated cities and towns are authorized to incur, on behalf of their counties, cities and towns, the expenses necessary to the enforcement of this chapter.