When two (2) or more persons are included in the same indictment, the court may, at any time before the defendants have gone into their defense, on the application of the prosecuting attorney, direct any defendant to be discharged from the indictment, that he may be a witness for the people.
Idaho Code § 19-2107