Here's a New York Times article about "The Mary Tyler Moore Show":
"All three of the final seasons won Emmys for outstanding comedy series — a prize it had never previously taken — and in each of those years the series also won the Emmy for writing. Besides “Chuckles Bites the Dust,” the honored episodes were “Mary Richards Goes to Jail” (a rare if gentle foray into Norman Lear-style topicality in which Mary landed behind bars for refusing to reveal a source) and for the show’s final episode, which still stands as the high-water mark for how to wrap up a sitcom in style."Hey, asshole (in this case Mark Harris -- somebody wrote those episodes. They didn't just happen to be written. Anonymity is the writer's life -- our reputation is what we trade for the money -- but if you're actually going to single out writing why not single out the writers while you're at it. Douchebag.
The whole list can be found here, but "Chuckles" was written by David Lloyd and "Jail" was written by Ed. Weinberger and Stan Daniels. The last show was written by the whole staff.