(1) If an appropriate authority is satisfied that--(a) it is necessary that an inmate should attend before it for the purposes of any legal proceeding, inquest or inquiry, and(b) the absence of the inmate may prejudice the rights of a party,the authority may make an order directing the Commissioner to cause the inmate to be produced at the court or other place at which the proceeding, inquest or inquiry is being, or is to be, held.
(2) Such an order is sufficient authority for the governor of the correctional centre in which the inmate is held to cause the inmate to be produced in accordance with the order.
(3) An inmate produced in accordance with such an order is taken to be in lawful custody while in the actual custody of the governor, a correctional officer, a sheriff's officer or a police officer.
(4) It is the duty of the person having actual custody of the inmate to return the inmate to the correctional centre from which the inmate was produced as soon as the appropriate authority permits.
(5) In this section--
"appropriate authority" means--(a) a court, or(b) a coroner, or(c) the Independent Commission Against Corruption, or(d) a Royal Commission, or(e) the Civil and Administrative Tribunal, or(f) the senior administrative officer (such as the clerk or registrar) of a court, or(g) a person prescribed by the regulations for the purposes of this definition.
"correctional officer" includes--(a) a person employed on a temporary basis within Corrective Services NSW to perform some or all of the duties of a correctional officer, and(b) a person holding an authority under section 240 to perform escort duties.
"court" includes the following--(a) the Children's Court,(b) the Federal Court of Australia,(c) the Federal Circuit and Family Court of Australia,(e) the Dust Diseases Tribunal,(f) any other court or body prescribed by the regulations for the purposes of this definition.