Some judges usually agree with a DA's recommendations, others do not. Judges are free to impose a sentence as they see fit. They are not bound by anyone's recommendations. However, they often give great weight to a DA's recommendation unless the defendant shows why that would be unfair.
Your friend should consult with his lawyer. I think the answer depends upon the Judge, the County, and the facts and circumstances of each case. Tell your friend to consult his/her lawyer. Good luck.