It shall be unlawful for a county legislative authority to employ or contract with any attorney or counsel to perform any duty which any prosecuting attorney is authorized or required by law to perform, unless the contract of employment of such attorney or counsel has been first reduced to writing and approved by the presiding superior court judge of the county in writing endorsed thereon. This section shall not prohibit the appointment of deputy prosecuting attorneys in the manner provided by law.
Any contract written pursuant to this section shall be limited to two years in duration.