Can a Lenient Sentence Be Given (In Drug Cases) Provided the Defendant Rehabilitates Himself and Cooperates With the Court ?

In People v. Grant, 243 A.D.2d 358, 663 N.Y.S.2d 540 (1st Dept. 1997), the defendant, a drug addict, pleaded guilty to two robbery charges. The sentencing court informed the defendant that if he completed a residential drug treatment program, the court would consider sentencing the defendant to the mandatory minimum sentences of 1-1/3 to 3 years on one charge and 2 to 6 years on the other charge, or less if consented to by the District Attorney's office. The sentencing court told the defendant that the lenient sentences were conditioned on his efforts to rehabilitate himself and cooperate with the court. The defendant was also told that If you get don't complete the program, if you get kicked out of the program, if your urine is dirty, you use drugs, if you get arrested again for anything, if you don't show up in court when your appearance is required because you decide to jump bail for whatever reason, then, ... I'm giving you 25 years in jail....