This would have to be something you can personalize but:
Explanation:
I would say something about your favorite memory to open it up, then I'd go on to describe your favorite assignment that is class specific, so that the teacher can be addressed directly instead of it being generic. I would also mention about *why* in particular that teacher is your favorite. Then say something about how you don't want the school year to end because the teacher is so great!