If the party is lawfully imprisoned or restrained and is not entitled to be enlarged on giving bail, he or she shall be remanded to the person from whose custody he or she was taken or to such other person or officer as is by law authorized to detain him or her.
R.I. Gen. Laws § 10-9-21