When the prisoner is detained upon any criminal accusation no order for discharge shall be made until sufficient notice of the time and place at which such writ shall have been returned or shall be made returnable shall be given to the district attorney of the county, if to be found within the county.
Wis. Stat. § 782.27