Corpuz v. Holder, 697 F.3d 807, *814 (9th Cir. Aug. 31, 2012) (while time in pre-conviction civil confinement to determine competence to stand trial generally would not be included in the phrase term of imprisonment for purposes of former INA 212(c), such a period is considered part of the term of imprisonment where the defendant was given credit for time served on the basis of the civil confinement, but with limitations: The question is how this time should be counted. We conclude that time spent in civil psychiatric confinement that is credited against a defendant's sentence should be counted in a manner that allows us to approximate, as closely as possible, the time the defendant would have served in prison had he never been in civil psychiatric confinement. This means that we should determine a constructive good time credit for the period spent in civil confinement based on the degree to which the defendant accumulated good time credit while in prison. The period spent in pre-trial psychiatric confinement should be calculated as part of the defendant's term of imprisonment only after this constructive good time credit is taken into account.).