Any city of the second or third class is hereby authorized to join with any one or more townships or portions of one or more townships in the maintenance and improvement of any cemetery within such city or townships, as hereinafter provided.