When two (2) or more persons are included in the same indictment, and the court is of opinion that in regard to a particular defendant there is not sufficient evidence to put him on his defense, it must order him to be discharged from the indictment before the evidence is closed, that he may be a witness for his codefendants.
Idaho Code § 19-2108