The TV show Newhart, starring Bob Newhart, had probably the best scripted ending for a TV show ever.
The show Newhart had Bob playing the owner of a New England bed and breakfast along with a cast of wacky characters and Mary Frann playing his wife. But Bob Newhart also had an earlier TV show, The Bob Newhart show where he played a psychiatrist with Suzanne Pleshette playing his wife.
https://en.wikipedia.org/wiki/Newhart#%22The_Last_Newhart%22
The series finale of Newhart, titled "The Last Newhart", has been described as one of the most memorable in television history.[2][3] The entire town is purchased by a visiting Japanese tycoon, who turns the hamlet into an enormous golf course and recreation resort. Dick and Joanna are the only townspeople who refuse to leave. The others accept huge payoffs and leave in a farewell scene that parodies Fiddler on the Roof.
Five years later, Dick and Joanna continue to run the Stratford Inn, which is now located in the middle of the golf course. The other townspeople, now richer and older, unexpectedly return for a reunion. The Darryl brothers also speak for the first time on screen, loudly yelling "Quiet!" at their wives in unison. Dick gets frustrated with the increasingly chaotic scene, and storms out shouting "You're all crazy!", only to be knocked out by an errantly struck golf ball.
The setting of the last scene is nighttime, in the bedroom of Dr. Bob Hartley (The Bob Newhart Show) and his wife Emily (Suzanne Pleshette). Hartley awakens, upset, and he wakes Emily to tell her about the very strange dream he has just had: that he was an innkeeper in a small Vermont town filled with eccentric characters and married to a beautiful blonde. Emily (slightly upset about hearing Bob's dream daliance with "a beautiful blond") tells him he cannot have Japanese food before bed anymore.
It was sort of a nod to the infamous Dallas episode, where Bobby comes out of the shower and we learn the that entire prior season was just a dream and Bobby isnt really dead.
Don’t forget the last line:
“Whaddaya mean beautiful blonde?”
“Go to sleep. You know you uh, you really should wear more sweaters.”
Bob Newhart’s “real” Wife thought up that ending.
So this was a reference to a show ending a series in which Bob amd his wife from a previous series awake and Bob relates the second series as a dream sequence but it was really a nod to a Dallas ending which had a dream scene to announce the return of a dead character.
Did I get that right? I should have got it, right?
One of us needs mental help/