It shall be the duty of the prosecuting attorney of any county to appear for or on behalf of the department or any water master, upon request of any such officer in any case which may arise in the performance of the official duties of any such officer within the jurisdiction of said prosecuting attorney.