This division shall be valid once a contract is entered into between the county and the City of Smithville in compliance with the laws of the state, which contract shall include a provision requiring the City of Smithville to pay to the county all costs incurred in performing the functions authorized under this division.