Sure, but in that specific case I’m sure the article would have referred to a plea bargain, because such a bargain must be disclosed (see Federal Rules of Criminal Procedure)
In my understanding this would depend on the type of plea deal, the court will be bound by a plea bargain according relating to section 11(c)(1)(C) of the Federal Rules of Criminal Procedure once the court accepts that bargain. Otherwise the defendant can withdraw their plea.
Also a plea deal according to section 11(c)(1)(A) would also de facto bind the court, because the prosecution will agree to not bring or move to dismiss certain charges, and the court can only sentence the defendant for the remaining charges.
Therefore these types of bargain are what a competent defense will seek, because the outcome for the client is advantageous, either charges are dismissed entirely, or the defendant can at least withdraw their plea if the court does not agree.
Either way, the teacher can appeal that sentence, and they should.