Courts and Court Officers Act 2009
Purposes of temporary custody.
7.— A prisoner or other person may be placed in temporary custody under section 6 for the purposes of facilitating—
(a) a court appearance by that person, or
(b) his or her participation, as a witness or in another capacity, in a court hearing involving him or her.