; and (B) by adding at the end the following: (g) Prerelease custody for risk and needs assessment system participants (1) Eligible prisoners This subsection applies in the case of a prisoner (as such term is defined in section 3635) who— (A) has earned time credits under the risk and needs assessment system developed under subchapter D (referred to in this subsection as the System ) in an amount that is equal to the remainder of the prisoner’s imposed term of imprisonment; (B) has shown through the periodic risk reassessments a demonstrated recidivism risk reduction or has maintained a minimum or low recidivism risk, during the prisoner’s term of imprisonment; (C) has been classified by the warden of the prison as otherwise qualified to be transferred into prerelease custody; and (D) (i) has been determined under the System to be a minimum or low risk to recidivate; or (ii) has had a petition to be transferred to prerelease custody approved by the warden of the prison, after the warden’s determination that— (I) the prisoner would not be a danger to society if transferred to prerelease custody; (II) the prisoner has made a good faith effort to lower their recidivism risk through participation in recidivism reduction programs or productive activities; (III) the prisoner is unlikely to recidivate; and (IV) the transfer of the prisoner to prerelease custody is otherwise appropriate. (2) Types of prerelease custody A prisoner shall be placed in prerelease custody as follows: (A) Home confinement (i) In general A prisoner placed in prerelease custody pursuant to this subsection who is placed in home confinement shall— (I) be subject to 24-hour electronic monitoring that enables the prompt identification of any violation of subclause (II)