“The Simpsons,” Sunday, WNYW/5, 8 p.m.

WHAT IT’S ABOUT The 600th episode is a “Treehouse of Horror,” and this edition -- as usual -- features three separate stories. In the first, “Dry Hard,” a major drought has gripped Springfield, and Mr. Burns -- who controls the remaining supply of water -- proposes a “Hunger Games” contest to see who can get a drink. In the second, “BFF,” Lisa, has an imaginary best friend, Rachel -- voiced by Sarah Silverman -- who essentially is an evil alter ego. In the third, “Moefinger,” Bart learns that something lies beneath the pool table in Moe’s Tavern.

Also noteworthy: This episode marks the return for one night only of old fan favorite, Frank Grimes.

MY SAY Six hundred episodes of “The Simpsons” and half of them seem to be “Treehouse of Horror” ones. Technically, of course, that’s not even remotely true. The one arriving Sunday is “XXVII” which stands for 27, or at least I think it does. Nevertheless, the “Treehouse” episodes -- or the best of them -- are stripped straight from the genetic code of the entire series. They’re certainly not “distillations” but part of the vast genome that makes “The Simpsons” truly “The Simpsons.” That’s why they have endured. That’s why it’s fitting the landmark 600th is a “Treehouse.”

“Treehouses” -- again, the best of them -- hatch in the darkest most seditious corners of the dark, seditious minds that create this great series. They invert an already inverted world. Where regular episodes of “The Simpsons” -- or so-called “canon” episodes -- revel in inanity, the “Treehouse of Horror” episodes revel in blood. And there will be blood Sunday. Oh, yes, there will be blood. Kids will die. Heads will roll. Or -- to quote Bart --“violence never solved anything. Except this.”

It’s also perfectly appropriate that Frank Grimes should be revived -- however briefly -- for the 600th. Grimes --voiced by Hank Azaria -- died more than 20 years ago. He had a nervous breakdown, then touched a high voltage wire in the nuke plant. Apparently charred beyond recognition, poor “Grimey” -- he hated that name -- was then placed in a coffin, and that was the last anyone saw or heard of him. Grimes, who despised Homer, was the voice of reason in Springfield. He was the guy who called out Homer for being lazy and dumb, and immune to even the most horrific accidents.

advertisement | advertise on newsday

He was also the guy who somehow failed to realize that he existed inside a cartoon world, where neither the laws of physics nor the laws of rationality prevailed. In a sense, Grimes had fallen down the proverbial rabbit hole. In fact, Alice herself, in explaining Wonderland, may have also best explained Grimey’s existential plight: “If I had a world of my own, everything would be nonsense. Nothing would be what it is, because everything would be what it isn’t. And contrary wise, what is, it wouldn’t be. And what it wouldn’t be, it would. You see?”

And what happens to poor Grimes this Sunday? He comes back as a ghost to a “Treehouse” episode where everything really is what it isn’t, and -- contrary-wise -- is also a vastly more inverted crazy-quilt version of the world that made him crazy in the first place (you see?).

The 600th episode, meanwhile, is terrific. Effortlessly funny -- although you know a vast amount of effort went into this -- it proves that, unlike Grimey, there’s still a lot of life left in this remarkable franchise. “The Simpsons,” with this “Treehouse” (and so many others) as its proxy, always knew the world was mad. Why fight the insanity when you can lampoon it?

Frank Grimes, may he R.I.P., never quite understood that lesson . . . and you saw what happened to him.

BOTTOM LINE A winner, and do not (repeat, do not) miss the closing seconds of “Moefinger.”

GRADE A