The legislative authority of any county, city or town may authorize its sheriff, director of public safety or chief of police to enter into any contract with another public agency which is necessary to carry out the provisions of chapter 152, laws of 1972 ex. sess.