(1) This section applies if—
(a) a police officer makes an application under section 77 in relation to a serious offender; and
(b) the serious offender is in the custody of a police officer or is otherwise detained under territory law (the original custody ).
(2) The Magistrates Court may, on the application of a police officer, issue a warrant directing the person holding the serious offender in the original custody to deliver the serious offender into the custody of the police officer (the temporary custody ) for the hearing of an application for an order under this part.
(3) The police officer given temporary custody must return the serious offender to the place of the original custody—
(a) if the application for the order is refused—without delay; or
(b) if the order is made—without delay after the period after the order is made that is reasonably necessary to carry out the forensic procedure.