(a)
Any person found in contempt of a court order or injunction pursuant to Section 17060, or who is convicted pursuant to Section 17061, for a second or subsequent time within a five-year period after a prior finding of contempt, after a prior conviction, or after the prior issuance of an injunction relating to the enforcement of this chapter, may, in lieu of any penalties ordered pursuant to Section 17061.5 or any other provision of law, be ordered by the court, on its own motion or pursuant to a trial by jury on that issue if that is requested by the defendant, to be placed in house confinement in the employee housing or any accommodation within the employee housing that is the subject of the court action. The house confinement ordered pursuant to this section shall be for a period not to exceed one year.
(b)
A defendant ordered to house confinement pursuant to this section may also be ordered by the court to pay the cost of having a police officer or guard stand guard outside the area in which the defendant has been confined under house confinement if it has been determined by the court that the defendant is able to pay these costs. No defendant shall be ordered, pursuant to this subdivision, to pay an amount exceeding two thousand dollars ($2,000) for any period of house confinement.