Windsor residents will recognize some scenes from the latest episode of “The Simpsons.”

Sunday night’s Canadian-themed episode features shots of Windsor, when Lisa Simpson ends up in the city.

The Windsor riverfront is shown from the Ambassador Bridge and viewers can also see Lisa sitting in Windsor overlooking the Detroit River.

"The Simpsons" consulting producer Tim Long grew up in Ontario and has always sensed something secretly Canadian about Lisa, the middle child and most critically-minded member of the enduring American animated family.

"She's the one who's had the most barbed critiques of the United States," Long, a writer-producer who was raised in Exeter, Ont., said in a recent phone interview with The Canadian Press.

"I thought Bart was sort of like America: brash, unreflective, much more sure of himself. And Lisa was sort of the intellectual, quiet, thoughtful, rational one. And I've always felt like that was sort of the relationship between America and Canada, too."

So when it came to Sunday's 'D'Oh Canada' episode on Fox, it felt natural to make Lisa the one who spends time on this side of the border, said Long, who has won five Emmy Awards.

It happens when the Simpsons visit Niagara Falls and, through a series of wacky mishaps, Lisa goes over the powerful flow of water that separates Ontario and New York.

She lands on the Canadian side and is admitted to hospital, where she realizes Canada is the place for her.

"She is not unscathed, but because of Canada's incredibly generous health-care system, she ends up just fine," said Long, who co-wrote the episode with his wife, screenwriter Miranda Thompson.

"The Simpsons, when they see her in the hospital, are fully prepared to go bankrupt, because that's what would happen to them in America. But they're stunned and amazed and delighted to find the health-care system takes care of them."

Yes, much of the Simpsons clan also visits Canada in the episode, which Long said has "a shocking number of Canadian things" that "95 per cent of the American audience won't get."

"They're briefly there but then Homer gets belligerent and they're asked to leave, except for Lisa. Then much of the rest of the show features the Simpsons plotting to get her back and trying to convince Lisa that she should come back, because she's at least initially very happy."

Toronto journalist Lucas Meyer voiced Prime Minister Justin Trudeau in the episode.

While Meyer recorded his role in September, Long said they write episodes "until the very last second," leaving room for current references.

With files from The Canadian Press.