Sometimes “The Simpsons” is like a Magic 8-Ball that can seem to hold all the answers. Peer deeply enough into the long odyssey of Homer, say, and a certain warped wisdom can float to the surface.

A perfect example: 16 years ago, in an episode titled “Bart to the Future,” the show predicted a Donald Trump presidency.

In the 2000 episode, Lisa becomes president, while brother Bart has slacked away his life. And from the Oval Office, she says, “As you know, we’ve inherited quite a budget crunch from President Trump.”

“The story was really about Bart saving Lisa’s presidency,” episode writer Dan Greaney said.

But how did the series arrive at a President Trump? Do show executives Matt Groening and James L. Brooks have a big Ouija board straight from Springfield, USA? Trump was just the right comedic fit at the time, explained Greaney, noting that they needed a name that sounded absurd.

Besides, Greaney said, “He seems like a ‘Simpsons’-esque figure — he fits right in there, in an over-the-top way. But now that he’s running for president, I see that in such a darker way. He seemed kind of lovable in the old days, in a blowhard way.”

The Harvard-sprung writer makes no great claim of political prescience, noting, “I never would have predicted this campaign.”

Tongue not entirely planted in cheek, Greaney accepts some of the collective blame, he said, for allowing a Trump to flourish as a candidate.

“I blame us — I blame the culture of comedy,” he said. Greaney posits that the movie “Animal House,” which “mocked the norms of decent behavior,” helped counterculture viewpoints launch into the American comedic mainstream, thus fostering establishment-mocking shows like “The Simpsons.” Perhaps all this mockery, he said, somehow gave rise to an “anti-political establishment” candidate like Trump.

There you have it, he concluded: “No ‘Animal House,’ no Trump.”

So to take “The Simpsons” one step further: Since Lisa becomes a historic woman president following Trump, does that mean the show was prognosticating as to a Hillary Clinton presidency?

“Lisa is [age] 8 on the show, and she would have to be at least 35 to be president,” Greaney said with a knowing dodge. “So 27 years is time for a lot of other presidents.”