Existing law, for some purposes, authorizes a child who is 12 years of age or older to consent to mental health treatment or counseling on an outpatient basis, or to residential shelter services, if the child is mature enough to participate intelligently in the outpatient services or residential shelter services, as specified, and either the child would present a danger of serious physical or mental harm to themselves or to others or if the child is the alleged affected by incest or child abuse.