Until judgment be given upon the return the court or judge before whom the prisoner is brought may either commit the prisoner to the custody of the sheriff or place the prisoner in such care or under such custody as age and other circumstances may require.
Wis. Stat. § 782.25