A sentence of imprisonment shall be stayed if an appeal is taken and the defendant is admitted to bail. If the defendant is not admitted to bail, the trial court upon request of the defendant, may order that the defendant be retained at, or transferred to, a place of confinement near the place of trial or some other convenient place, for a period reasonably necessary to permit the defendant to assist in the preparation of his appeal to the Supreme Court.
SDCL 23A-33-2