In a proceeding to enforce this chapter brought pursuant to Article 14 (commencing with Section 601) of Chapter 2 of Part 1 of Division 2 of the Welfare and Institutions Code, the court may require the custodial parent or legal guardian of a minor who violates this chapter to participate in classes on parenting education that meet the requirements established in Section 16507.7 of the Welfare and Institutions Code.