I have been looking for and watching Halloween-themed episodes of different TV shows. I just watched the Halloween episode of "Frasier" from 1997 on You Tube. This is the episode in which the cast attends a literary-themed party at Niles's house as well as the episode in which Roz discovers she might be pregnant. I thought it was funny how Bulldog showed up as Waldo. I'm guessing Frasier's son never read those books, if Frasier was not aware of the character. For those not aware, here is some info on "The Story of 'O.'"
Unfortunately, the user doesn't allow the episode to embedded, so here is the link to that episode.