When from illness or other cause the prosecuting attorney is temporarily unable to perform his or her duties, the court or judge may appoint some qualified person to discharge the duties of such officer in court until the disability is removed.
When any prosecuting attorney fails, from sickness or other cause, to attend a session of the superior court of his or her county, or is unable to perform his or her duties at such session, the court or judge may appoint some qualified person to discharge the duties of such session, and the appointee shall receive a compensation to be fixed by the court, to be deducted from the stated salary of the prosecuting attorney, not exceeding, however, one-fourth of the quarterly salary of the prosecuting attorney: PROVIDED, That in counties wherein there is no person qualified for the position of prosecuting attorney, or wherein no qualified person will consent to perform the duties of that office, the judge of the superior court shall appoint some suitable person, a duly admitted and practicing attorney-at-law and resident of the state to perform the duties of prosecuting attorney for such county, and he or she shall receive such reasonable compensation for his or her services as shall be fixed and ordered by the court, to be paid by the county for which the services are performed.