Section 9501 shall not apply to any of the following:
- (a) Any facility providing rehabilitative, counseling, treatment, mental health, educational, or medical services to a juvenile that is under the jurisdiction of the juvenile court pursuant to Part 1 (commencing with Section 100) of Division 2 of the Welfare and Institutions Code.
- (b) Any facility providing evaluation or treatment services to a person who has been detained, or is subject to an order of commitment by a court, pursuant to Section 1026, or pursuant to Division 5 (commencing with Section 5000) or Division 6 (commencing with Section 6000) of the Welfare and Institutions Code.
- (c) Any facility providing educational, vocational, medical, or other ancillary services to an inmate in the custody of, and under the direct supervision of, the Department of Corrections and Rehabilitation or a county sheriff or other law enforcement agency.
- (d) A residential care facility licensed pursuant to Division 2 (commencing with Section 1200) of the Health and Safety Code.
- (e) Any school facility used for the disciplinary detention of a pupil.
- (f) Any facility used for the quarantine or isolation of persons for public health reasons pursuant to Division 105 (commencing with Section 120100) of the Health and Safety Code.
- (g) Any facility used for the temporary detention of a person detained or arrested by a merchant, private security guard, or other private person pursuant to Section 490.5 or 837.