The court before which any criminal prosecution is pending may order such number of witnesses as the court approves to be summoned on behalf of the accused at the expense of the state.