
131 Cal.Rptr.2d 160 (2003)
106 Cal.App.4th 597
In re SERGIO R., a Person Coming Under the Juvenile Court Law.
The People, Plaintiff and Respondent,
v.
Sergio R., Defendant and Appellant.
No. A097287.
Court of Appeal, First District, Division One.
February 25, 2003.
*161 Bill Lockyer, Attorney General, Robert R. Anderson, Chief Assistant Attorney General, Ronald A. Bass, Senior Assistant Attorney General, Ross C. Moody, Deputy Attorney General, For Plaintiff and Respondent.
Gary Garfinkle, Esq., Under appointment by the Court of Appeal, Lafayette, For Defendant and Appellant.
Certified for Partial Publication.[*]
SWAGER, J.
Following a finding by the trial court that appellant was not an appropriate candidate for deferred entry of judgment (Welf. & Inst.Code, § 790 et seq.), he admitted two charges filed against him in section 602 petitions for possession of methamphetamine (Health & Saf.Code, § 11377, subd. (a)) and first degree burglary (Pen.Code, § 459).[1] He was declared a ward of the juvenile court, and ordered confined at the Fouts Springs Boys Ranch for a maximum period of six years and *162 four months, followed by probation upon specified terms and conditions. In this appeal, he claims that the trial court erred by refusing to grant him deferred entry of judgment, ordered an excessively restrictive commitment, and imposed an invalid condition of probation. We affirm the judgment.

STATEMENT OF FACTS AND PROCEDURAL HISTORY[2]
The charged offenses were based upon several incidents, the first of which occurred on September 8, 2001, when a Vacaville police officer encountered appellant leaving the residence of a "known and documented Norteno gang member" on Callen Street, after visiting his girlfriend there. Appellant had tattoos, red clothing and a hairstyle "indicative of Norteno gang affiliation." A search of appellant uncovered a pocketknife and a "crank pipe" he admittedly used to smoke methamphetamine.
On October 12, 2001, Lorenzo Padilla's vehicle, a gray 1986 Nissan, was stolen, and the next day his house in Suisun was burglarized. Stolen from Padilla's residence during the burglary were rifles, televisions, a computer, and "other electronic equipment." Padilla's grandson Jose Quezada, a known Norteno "gang member out of Napa" with "two outstanding warrants for his arrest," had been reportedly seen driving the stolen vehicle.
Vacaville police officers discovered Padilla's Nissan parked in Scoggins Court in Vacaville on October 13, 2001. Later that day the officers observed Quezada on the north side of a residence on Scoggins Court near the stolen vehicle with a group of "several other subjects," one of them appellant, also "known to be a BSL Norteno." Quezada was arrested on the warrants and for possession of suspected methamphetamine found near him. Miguel Melendrez, another Norteno gang member in the group, was arrested for possession of cocaine and marijuana. A "long mace-like stick weapon" was found in the immediate area of the group, and an empty .22-caliber magazine was observed on the same step on which appellant had been seated.
With appellant's consent, the officers searched his residence. They were escorted by appellant to the backyard, where stereo equipment and a heater stolen from Padilla's residence were found under a blanket. Appellant admitted that as part of his "minimal" participation with Quezada and others in the burglary at Padilla's residence, he removed items from the house, stored them on his property, and gave a stolen television set to someone else. Appellant also directed the investigating officer to a ".22 rifle which matched the magazine," that "was located in the crawl space under the next apartment."
On October 16, 2001, appellant was contacted and searched by a Vacaville police officer behind an abandoned building. Two small baggies were taken from appellant; one contained methamphetamine, the other marijuana. Appellant admitted that he used methamphetamine that morning. He was also in possession of a large black marking pen, which his companion told the officer appellant had used to tag the building walls with "gang graffiti writings."
Appellant acknowledged to the police and his probation officer that he was a "Norteno gang member" and methamphetamine addict. He also used marijuana "on *163 a daily basis" and cocaine occasionally. He did not attend school after expulsion for foul language, disruptive behavior and gang activity. Appellant's mother stated that appellant refused to attend school and "was beyond her control." Appellant further advised the probation department that "since he was 12 years of age" he has engaged in a sexual relationship with an adult girlfriend, who was pregnant.[3]

DISCUSSION

I. The Trial Court's Refusal to Grant Appellant Deferred Entry of Judgment.
Appellant argues that the trial court erred by refusing to order deferred entry of judgment under rule 1495 and section 790 et seq.[4] Pursuant to section 790 and rule 1495, during the proceedings the district attorney filed a determination of eligibility for deferred entry of judgment that specified appellant met the eligibility requirements of the statute. The probation department and the district attorney, however, opposed deferred entry of judgment for appellant. Following a hearing on the matter, the trial court agreed with the probation department and found appellant unsuitable to participate in the deferred entry of judgment program. Appellant complains that the court "disregarded the statutory criteria," "failed to give consideration to crucial factors," and improperly relied upon the district attorney's speculation and mischaracterizations in denying him the benefit of deferred entry of judgment. He argues that since he "met all the requirements specified by rule 1495, the juvenile court abused its discretion and erred by denying deferred entry of judgment."
Our first task is to determine whether, as appellant seems to suggest, failure to grant deferred entry of judgment is error if the minor meets the articulated statutory eligibility requirements. We must interpret the statutes to ascertain the intent of the legislative body so as to effectuate the purpose of the law. (People v. Jefferson (1999) 21 Cal.4th 86, 94, 86 Cal.Rptr.2d 893, 980 P.2d 441; People v. Dyer (2002) 95 Cal.App.4th 448, 452-453, 115 Cal. Rptr.2d 527.) "`"`Penal Code sections must generally be construed "`according to the fair import of their terms, with a view to effect its objects and to promote justice.'"' [Citations.] [¶] `Consistent with that general principle, appellate courts first examine the language of the code section to determine whether the words used unequivocally express the Legislature's intent. If no ambiguity, uncertainty, or doubt about the meaning of the statute appear, the provision is to be applied according to its terms without further judicial construction. [Citations.] [¶] When the language of the section is on its face ambiguous or leaves doubt, . . ., the court must resort to extrinsic aids to ascertain the purpose behind the statute and give the provision a judicially created meaning commensurate with the purpose. [Citation.]' [Citations.]"' [Citation.]" (People v. Franz (2001) 88 Cal.App.4th 1426, 1440, 106 Cal.Rptr.2d 773; see also People v. Avila (2000) 80 Cal.App.4th 791, 796, 95 Cal.Rptr.2d 651.) Our interpretation of the statutory requirements for deferred entry of judgment is guided by settled principles. "[W]e look first to the *164 plain meaning of the statute. If the statute's meaning is ambiguous, we turn to the voters' intent and, finally, if the voters' intent is not clear, construe the statute most favorably to . . . the offender." (People v. Superior Court (Henkel) (2002) 98 Cal.App.4th 78, 81, 119 Cal.Rptr.2d 465.)
"`Whether a particular statute is intended to impose a mandatory duty, rather than a mere obligation to perform a discretionary function, is a question of statutory interpretation for the courts.' [Citation.] The enactment's language `is, of course, a most important guide in determining legislative intent, [but] there are unquestionably instances in which other factors will indicate that apparent obligatory language was not intended to foreclose a governmental entity's or officer's exercise of discretion.' [Citation.]" (Haggis v. City of Los Angeles (2000) 22 Cal.4th 490, 499, 93 Cal.Rptr.2d 327, 993 P.2d 983.)
Nothing in the statutory language indicates to us an intent to require the juvenile court to grant deferred entry of judgment if the "circumstances" specified in section 790 and rule 1495 are found to exist.[5] To the contrary, the statutes invariably use discretionary rather than compulsory terms when expressing both the guidelines and procedures that govern the trial court's responsibility to grant deferred entry of judgment to a qualifying juvenile defendant.
Rule 1495(a) provides that a juvenile "may be considered for a deferred entry of judgment" if all of the eligibility requirements are met. (Italics added.) The procedures enumerated in the statutes once the threshold eligibility determination is made confirm that a grant of deferred entry of judgment is discretionary rather than mandatory. Subdivision (b) of section 790 specifies that "[i]f the minor is found eligible for deferred entry of judgment, the prosecuting attorney shall file a declaration in writing with the court or state for the record the grounds upon which the determination is based," and the trial court then "may set the hearing for deferred entry of judgment at the initial appearance under Section 657." (Italics added.) The written notification sent to the eligible minor must include: "A clear statement that, in lieu of jurisdictional and disposition hearings, the court may grant a deferred entry of judgment with respect to any offense charged in the petition, *165 provided that the minor admits each allegation contained in the petition and waives time for the pronouncement of judgment . . . ." (§ 791, subd. (a)(3), italics added.)[6]
If the eligibility standards are met, "the court may refer the case to the probation department" for an investigation and report "or the court may summarily grant deferred entry of judgment . . . ." (§ 791, subd. (b), italics added; rule 1495(d)(2).) "When directed by the court, the probation department shall make an investigation and take into consideration the defendant's age, maturity, educational background, family relationships, demonstrable motivation, treatment history, if any, and other mitigating and aggravating factors in determining whether the minor is a person who would be benefited by education, treatment, or rehabilitation. The probation department shall also determine which programs would accept the minor. The probation department shall report its findings and recommendations to the court . . . ." (§ 791, subd. (b), italics added; rule 1495(d)(3)(A).) The court then makes the final decision on whether the minor will benefit from "education, treatment, or rehabilitation," (§ 791, subd. (b)) either without a hearing based upon the supplemental information submitted, or following a hearing at which consideration is given to "the declaration of the prosecuting attorney, any report and recommendations from the probation department, and any other relevant material provided by the child or other interested parties." (Rule 1495(f).) "If the court grants the deferred entry of judgment," search-and-seizure probation conditions must be imposed, and additional conditions "may" be ordered regarding education, treatment, random testing for alcohol and other drugs, if appropriate, curfew, and any other "conditions consistent with the identified needs of the child and the factors that led to the conduct of the child." (Rule 1495(f)(4), italics added; see also § 794.)
We are persuaded that the statutory language empowers but does not compel the juvenile court to grant deferred entry of judgment once eligibility under section 790, subdivision (a) is established. (See Allyson v. Department of Transportation (1997) 53 Cal.App.4th 1304, 1319, 62 Cal.Rptr.2d 490; People v. Superior Court (Alvarado) (1989) 207 Cal.App.3d 464, 476, 255 Cal.Rptr. 46; People v. Reiley (1987) 192 Cal.App.3d 1487, 1489, 238 Cal.Rptr. 297.) "`"Shall" is mandatory, . . . "may" is permissive.' (Cal. Rules of Court, rule 407(a).)"[7] (People v. Reiley, supra, at p. 1489, 238 Cal.Rptr. 297; see also Judith P. v. Superior Court (2002) 102 Cal.App.4th 535, 551, 126 Cal.Rptr.2d 14.) "[T]he usual rule with California codes is that `shall' is mandatory and `may' is permissive unless the context requires otherwise." (Walt Rankin & Associates, Inc. v. City of Murrieta (2000) 84 Cal.App.4th 605, 614, 101 Cal.Rptr.2d 48.) In the context of the statutory deferred judgment scheme, the consistent use of permissive rather than mandatory terms manifests a legislative *166 intent to confer discretionary authority upon the trial court to act following a determination of eligibility. (See People v. Ledesma (1997) 16 Cal.4th 90, 94-95, 65 Cal.Rptr.2d 610, 939 P.2d 1310; People v. Craft (1986) 41 Cal.3d 554, 558-559, 224 Cal.Rptr. 626, 715 P.2d 585.)
A conclusion that a grant of deferred entry of judgment to an eligible juvenile is not compulsory is also necessary to achieve a result in harmony with the rest of the statutory enactment. (See People v. Mendoza (2000) 23 Cal.4th 896, 908-909, 98 Cal.Rptr.2d 431, 4 P.3d 265.) "A statute must be construed in the context of the entire statutory scheme of which it is a part, in order to achieve harmony among the parts. [Citations.] Also to be considered is the maxim that `". . . statutes should be interpreted in such a way as to make them consistent with each other, rather than obviate one another. [Citation.]"' [Citations.]" (People v. Lewis (1993) 21 Cal.App.4th 243, 254, 25 Cal. Rptr.2d 827.) The provisions that direct and empower the trial court to refer the case to the probation department for investigation and report, consider the findings and recommendations of the probation department, independently determine whether the eligible minor will benefit from "education, treatment, or rehabilitation," and impose probation conditions if deferred entry of judgment is granted, all would be rendered meaningless surplusage if the court had no discretion to deny deferred entry of judgment once the eligibility requirements were satisfied. (People v. Hicks (1993) 6 Cal.4th 784, 794, 25 Cal.Rptr.2d 469, 863 P.2d 714.) We must interpret the statutory language in a manner that avoids such an absurd result. (See Gregory v. State Bd. of Control (1999) 73 Cal.App.4th 584, 595, 86 Cal.Rptr.2d 575; Gomes v. County of Mendocino (1995) 37 Cal.App.4th 977, 986, 44 Cal. Rptr.2d 93.)
The adult deferred judgment program (Pen.Code, § 1000 et seq.), also known as drug diversion, although more limited in its scope of eligibility to specified drug offenses, has corresponding provisions. "Under Penal Code section 1000 et seq., eligible drug offenders may be considered for a diversion program in lieu of criminal prosecution." (People v. Fleming (1994) 22 Cal.App.4th 1566, 1569, 28 Cal.Rptr.2d 78.) Like the juvenile deferred judgment program, "the inquiry into diversion begins with a preliminary screening for eligibility conducted by the district attorney under standards prescribed by the statute. Section 1000 provides that when a defendant is charged with one of six offenses therein specified  principally unlawful possession of narcotics, marijuana, or restricted dangerous drugs  the district attorney will review the defendant's file to determine whether he also meets certain minimum standards of eligibility for the diversion program." (People v. Superior Court (On Tai Ho) (1974) 11 Cal.3d 59, 62, 113 Cal.Rptr. 21, 520 P.2d 405, fn. omitted; see also People v. Sturiale (2000) 82 Cal. App.4th 1308, 1313, 98 Cal.Rptr.2d 865.) "If the defendant meets all six criteria, the process of adjudication begins, during which the court will weigh relevant facts and make a decision either diverting or refusing to divert the defendant into a rehabilitation program." (People v. Paz (1990) 217 Cal.App.3d 1209, 1213, 266 Cal. Rptr. 468.)[8] The adjudicatory function to weigh the relevant facts and "make a decision either diverting or refusing to divert the defendant into a rehabilitation program" *167 is vested "in the trial court: `The court shall hold a hearing and, after consideration of the probation department's report and any other information considered by the court to be relevant to its decision, shall determine if the defendant consents to further proceedings under this chapter and waives his right to a speedy trial and if the defendant should be diverted and referred for education, treatment, or rehabilitation.'" (People v. Superior Court (On Tai Ho), supra, at pp. 62-63, citation and italics omitted.)
The drug diversion statutes have been construed not to impose an obligation on the trial court, but rather to grant discretion to divert an eligible defendant based upon "whether the accused `would be benefited by education, treatment, or rehabilitation.' (Pen.Code, §§ 1000.1, subd. (a), 1000.2.)" (Harvey v. Superior Court (1974) 43 Cal.App.3d 66, 68, 117 Cal.Rptr. 383; see also People v. Fleming, supra, 22 Cal.App.4th 1566, 1569-1570, 28 Cal.Rptr.2d 78.) No reason appears to us to interpret the substantially similar language of the two comparable statutory schemes to have two different meanings. (Malcolm v. Superior Court (1981) 29 Cal.3d 518, 527-528, 174 Cal. Rptr. 694, 629 P.2d 495; In re Jerry R. (1994) 29 Cal.App.4th 1432, 1437, 35 Cal. Rptr.2d 155.) In accordance with the plain meaning of the statutory language we conclude that the juvenile court has discretion to grant deferred entry of judgment to an eligible minor. Contrary to appellant's suggestion, denial of deferred entry of judgment is not an abuse of discretion merely because the minor has satisfied the eligibility requirements of section 790, subdivision (a), and rule 1495(a). Instead, the court makes an independent determination after consideration of the "suitability" factors specified in rule 1495(d)(3) and section 791, subdivision (b),[9] with the exercise of discretion based upon the standard of whether the minor will derive benefit from "education, treatment, and rehabilitation" rather than a more restrictive commitment. (§ 791, subd. (b); rule 1495(b)(2), and (f).)
We further conclude that the record in the present case fails to demonstrate any abuse of discretion by the trial court. The court did not disregard statutory criteria and improperly rely on "speculation" or "incorrect assertions" by the district attorney that appellant was "not eligible for deferred entry of judgment," as he maintains. The district attorney did not assert that appellant was ineligible for deferred entry of judgment; his eligibility had already been established and acknowledged by respondent. Instead, the district attorney argued that appellant "is absolutely not appropriate for deferred entry of judgment just on the face of it," then proceeded to explain the supporting reasons.[10] The court considered and followed the recommendation in the probation department's report that appellant was an entirely *168 unsuitable, although eligible, candidate for deferred entry of judgment.
We also agree with the court's assessment of the relevant factors stated in the record. While appellant's youth and lack of a prior record of offenses militate in favor of deferred entry of judgment, the remaining factors amply support the trial court's decision. He is an entrenched Norteno gang member with a history of drug abuse and admitted addiction to methamphetamine. In addition to the drug offenses, he participated with other Norteno gang members in a residential burglary and the theft of property that included a .22 rifle. He stored some of the items appropriated in the burglary at his residence, and concealed the stolen rifle next door. When he was detained after the burglary with a group of other Norteno gang members, a .22-caliber magazine and a "mace-like stick weapon" were discovered nearby. On another occasion, he was found in possession of a pocketknife. Appellant no longer attended school, and his mother stated that he had become unmanageable. The evidence established that appellant was not a suitable candidate for deferred entry of judgment, and required more formal, restrictive measures. Denial of deferred entry of judgment was not error.
II.-III.[**]

DISPOSITION
Accordingly, the judgment is affirmed.
We concur: MARCHIANO, P.J., and MARGULIES, J.
NOTES
[*]   Pursuant to California Rules of Court, rules 976(b) and 976.1, this opinion is certified for publication with the exception of part II and part III.
[1]  Unless otherwise indicated, all statutory references are to the Welfare and Institutions Code; all references to rules are to the California Rules of Court. As a result of the negotiated disposition of the case, two other charges of possession of a smoking device (Health & Saf.Code, § 11364), and possession of marijuana (Health & Saf.Code, § 11357, subd. (b)), both misdemeanor offenses, were dismissed.
[2]  In light of appellant's admissions and the negotiated disposition, we concisely recite the pertinent facts from the probation department's report as necessary for a resolution of the sentencing issues presented in this appeal.
[3]  Appellant's mother was aware of the relationship. At court appearances, she falsely identified appellant's "adult pregnant girlfriend" as "her own sister-in-law," who was "married to, and pregnant by, the mother's brother."
[4]  The law governing deferred entry of judgment was adopted as an initiative measure, Proposition 21, approved by the voters on March 7, 2000.
[5]  Subdivision (a) of section 790 states that the provisions for deferred entry of judgment "apply whenever a case is before the juvenile court for a determination of whether a minor is a person described in Section 602 because of the commission of a felony offense, if all of the following circumstances apply. [¶] (1) The minor has not previously been declared to be a ward of the court for the commission of a felony offense. [¶] (2) The offense charged is not one of the offenses enumerated in subdivision (b) of Section 707.[¶] (3) The minor has not previously been committed to the custody of the Youth Authority. [¶] (4) The minor's record does not indicate that probation has ever been revoked without being completed. [¶] (5) The minor is at least 14 years of age at the time of the hearing. [¶] (6) The minor is eligible for probation pursuant to Section 1203.06 of the Penal Code."

Rule 1495(a) similarly provides: "A child 14 years or older who is the subject of a petition under section 602 alleging violation of at least one felony offense may be considered for a deferred entry of judgment if all of the following apply: [¶] (1) The child is 14 years or older at the time of the hearing on the application for deferred entry of judgment; [¶] (2) The offense alleged is not listed in section 707(b); [¶] (3) The child has not been previously declared a ward of the court based on the commission of a felony offense; [¶] (4) The child has not been previously committed to the California Youth Authority; [¶] (5) If the child is presently or was previously a ward of the court, probation has not been revoked prior to completion; and [¶] (6) The child meets the eligibility standards set forth in Penal Code section 1203.06."
[6]  Section 791, subdivision (a)(3) reads in full: "A clear statement that, in lieu of jurisdictional and disposition hearings, the court may grant a deferred entry of judgment with respect to any offense charged in the petition, provided that the minor admits each allegation contained in the petition and waives time for the pronouncement of judgment, and that upon the successful completion of the terms of probation, as defined in Section 794, the positive recommendation of the probation department, and the motion of the prosecuting attorney, but no sooner [than] 12 months and no later than 36 months from the date of the minor's referral to the program, the court shall dismiss the charge or charges against the minor."
[7]  Effective January 1, 2001, rule 407 was renumbered rule 4.407.
[8]  Again, as with the juvenile deferred judgment statutes, the responsibility to "develop the facts bearing on the particular defendant's suitability for diversion" is assigned by Penal Code section 1000.1 to "the probation department: if the defendant consents and waives his right to a speedy trial, the department will `make an investigation and take into consideration the defendant's age, employment and service records, educational background, community and family ties, prior narcotics or drug use, treatment history, if any, demonstrable motivation and other mitigating factors in determining whether the defendant is a person who would be benefited by education, treatment, or rehabilitation.' After further determining which community programs would benefit and would accept the defendant, the probation department reports its findings and recommendations to the court." (People v. Superior Court (On Tai Ho), supra, 11 Cal.3d 59, 62, 113 Cal.Rptr. 21, 520 P.2d 405, italics omitted.)
[9]  That is, the minor's "age, maturity, educational background, family relationships, motivation, any treatment history, and any other relevant factors regarding the benefit the child would derive from education, treatment, and rehabilitation efforts. . . ." (Rule 1495(d)(3)(A)(i).)
[10]  Appellant seems to confuse two distinct essential elements of the deferred entry of judgment program: the first, eligibility, which is found if all of "circumstances" listed in section 790, subdivision (a), are present; and the second, suitability, which requires a finding by the court that the minor will benefit from "education, treatment, and rehabilitation," and is based upon the factors specified in rule 1495(d)(3) and section 791, subdivision (b).
[**]   See footnote *, ante.
