(a)
When an individual, including a minor charged with an offense for which he or she may be made a ward of the court under Section 602 of the Welfare and Institutions Code, has either been charged with a crime, but is not being held in a correctional institution due to his or her release, either through the granting of bail, a release on the individual’s own recognizance, or for any other reason, or been convicted of a crime, but not held in a correctional institution due to the imposition of probation, a fine, or any other alternative sentence, and the individual is required to undergo initial or followup testing pursuant to this title, the failure of the individual to submit to the test may be grounds for revocation of the individual’s release
or probation or other sentence, whichever is applicable.
(b)
Any refusal by a person on parole, probation, mandatory supervision pursuant to paragraph (5) of subdivision (h) of Section 1170, or postrelease community supervision to submit to testing required pursuant to this title may be ruled as a violation of the person’s parole, probation, mandatory supervision, or postrelease community supervision.