*Warning: Spoiler Alert for BoJack Horseman Season 5*

In “Free Churro,” from the fifth season of BoJack Horseman, the titular Hollywood horse actor (voiced by Will Arnett) delivers a eulogy at his mother’s funeral. It’s a tour-de-force performance—essentially the only one we see in the entire episode. But more than that, the 25-minute monologue encapsulates what makes Raphael Bob-Waksberg’s animated Netflix series one of the best shows on television. It soars because of its eloquence, the way it articulates just how sad life can be while also displaying a masterful devotion to the art of comedy.

BoJack had a very complicated relationship with his mother, Beatrice Horseman (voiced by Wendie Mallick, best known for playing the quixotic former supermodel Nina Van Horn on Just Shoot Me). Processing her death has been confusing and numbing; BoJack has no clue what to say in the wake of it. So he starts his eulogy by just winging it, recounting how on the way to the funeral he stopped at a Jack in the Box, where a woman behind the counter asked how he was doing. Specifically, she asked him, “Are you having an awesome day?” Feeling justified, for once, for not having an awesome day, BoJack informed the cashier that, no, he was in fact feeling pretty shitty since his mom had just died. The woman immediately started crying, and BoJack suddenly had to comfort her. When she regained her composure, she offered perhaps the only thing she could to console her customer: a free churro with his meal.

“I just got a free churro because my mom died,” BoJack thinks as he leaves the Jack in the Box. “No one ever tells you when your mom dies you get a free churro.”

Subscribe to Observer’s Entertainment Newsletter

At that point we hear the funeral guests—who remain unseen until the very end of the episode—rustle uncomfortably in their seats. BoJack hasn’t offered up a joke, per se, just a realization he has in the moment: that his mother is dead, and all he got was a free churro. The line is funny in that way that death is funny—because you don’t know what else to feel. It’s really about the awkwardness of death. In this scenario, comedy is the easiest solution—“let’s just laugh to forget how sad everything is.” Because this form of comedy requires reflection and acknowledging the cold, hard, dark truth, it’s rarely ever funny funny. It’s there to alleviate the tension. BoJack Horseman, however, often does more than that, not only in this episode, or in its fifth season, but as a series. It strikes a perfect balance between genuine laughter and laughing through the tears. And that’s how it distinguishes itself from so many other sitcoms currently on television.

In this age of TV comedy in which the “comedy” can feel like an afterthought, BoJack Horseman is out there making puns so cheap that, like some old vintage Beanie Baby, they come full circle to pricelessness. “I don’t want to embarrass you by making this eulogy into a me-logy,” BoJack quips to the closed casket in which his mother will lie for eternity. “So seriously, if you want me to sit down and let someone else talk, just knock once. I will not be offended.” (The knock, of course, never comes.)

There’s a craft in the writing of this scene that pays homage to the Mount Rushmore of comedy: the Marx Brothers. Though their films seem freewheeling and highly improvised, the Marx Brothers went through draft after meticulous draft, often using multiple writers for their scripts. The results were movies that hum with the precision of a finely tuned automobile. Their 1933 masterpiece, Duck Soup, contains some of fastest, sleekest, smoothest jokes you’re ever likely to hear, whizzing by at 100 mph: “Remember, you’re fighting for this woman’s honor,” says one character, “which is probably more than she ever did.”

During his eulogy, BoJack does a brilliant bit with an off-camera pianist and some wacky sound effects that is 100% pure, unadulterated Groucho Marx:

BoJack: “You know, I was a little worried I wouldn’t have the right accompaniment today. I guess it’s a good thing my mom was an organ donor.” Rimshot. BoJack: “What happened to the organ?” Clown car horn. BoJack: “This is a funeral, sir, for my mother, could you show a little respect?” Womp-womp. BoJack: “Eh, I’ll take it.”

You half-expect BoJack to suddenly sprout a painted mustache, start smoking a cigar and run off to befuddle some dowager. Episode 3 of Season 5 is perhaps the show’s most Marxian in tone. It features an elaborate slapstick scene involving BoJack’s asexual pal Todd (Aaron Paul), the inappropriately sex-positive family of Todd’s asexual lady companion and their prized heirloom: a barrel of grandma’s famous lube. It also contains one of Mr. Peanut Butter’s (Paul F. Tompkins) most over-the-top pun setups: “As Courtney Cox said when she discovered a rotting corpse in the woods near the Cougar Town set…”—wait for it—“‘Good god, I hope you’re not Busy.’”

But where the Marx Brothers never relied on sentimentality, BoJack is defined by its underlying tragedy—a tragedy derived from the excesses of fame, the hollowness of show business and, maybe most of all, its characters’ painful memories. “Free Churro” opens with a young BoJack, who’s been forgotten by his mother after he gets out of soccer practice. His father, an alcoholic would-be writer, begrudgingly picks up his son instead, only to give him a dressing-down and lambaste his absent, long-suffering wife, who is having “another one of her episodes” and has locked herself in the bedroom. She is weeping—“loudly,” adds Butterscotch Horseman. “Now it’s one thing for a woman to weep. But when they do it at such a volume you can hear it through the door, that’s when you know they’re doing it just for the attention.” (Season 4 explored what made Beatrice such a monster of a mother—we learn that her husband played a major part in it.)

The scene then cuts to BoJack’s episode-long eulogy, in which he tries to work out his feelings for a woman who was never really a maternal figure to him. The one positive anecdote BoJack shares has actually been stolen from an episode of the 1970s Bea Arthur sitcom, Maude. “All I know about being good I learned from TV,” BoJack says. “And in TV, flawed characters are constantly showing people they care with these surprising grand gestures.” BoJack continues, “I think a part of me still believes that’s what love is.”

Still, it’s too easy—a cliché, really—to believe that every curmudgeon is secretly a lovable person who is just misunderstood. It’s a popular trope going back to A Christmas Carol, in which Old Man Scrooge reveals his heart of gold to the delight of all the people he’s ostracized and hurt on the way to his awakening. In that other great Bea Arthur sitcom, The Golden Girls, Rose Nylund (Betty White)—a perpetual Pollyanna—learns that this is, in fact, not true. In “It’s a Miserable Life,” a verbal altercation with her unneighborly neighbor Freida Claxton ends in Freida’s death. At “Old Lady Claxton”’s funeral, a mysterious visitor rushes in and gives a touching eulogy about how the deceased woman donated her time and money selflessly and secretly. But just when Rose and the other girls are on the verge of tears, the joke drops as suddenly as Mrs. Claxton did: Turns out, that grieving stranger is at the wrong funeral.

Sitcoms often like to lull us into a false sense of sentimentality. It would’ve been easy to make Freida Claxton a sympathetic character, and a lesser sitcom would have gone that route. But Golden Girls is one of the best-written sitcoms ever, and by subverting our expectations, the writers were able to turn a maudlin affair into a hilarious one. That’s because the comedy comes from the death, not the dying.

It’s a similar case in “Chuckles Bites the Dust,” the classic episode from that other great Betty White sitcom, The Mary Tyler Moore Show, wherein Mary Richards (Moore) fights famously and futilely to keep a straight face at a clown’s rather humorless funeral.

The joke isn’t that this guy has died—it’s that he’s dead and the joke is now on us. The joke is in Mary trying to find the tragedy in what shouldn’t be but is a humorous situation. The joke is in flipping the script on poor Rose with the realization that some people are just terrible. The joke is in BoJack trying to find something nice to say about a woman about whom there is nothing nice to say. In all these cases, the awkwardness of death is amplified, not just to alleviate tension, but to truly elevate it to a comedic level.

In BoJack Horseman, when things get emotionally messy, as they so often do, there’s always that perfect joke to pull things back from the brink—from what can feel like the very epicenter of depressing. After BoJack finishes his 25-minute eulogy and bares his soul, he opens the casket only to realize he’s been speaking, much like in “It’s a Miserable Life,” at the wrong funeral. It’s a perfect ending, turning everything he previously said, and his naked vulnerability, into a punchline. In real life, when things get messy, the jokes aren’t so perfect. But comedy still serves as a makeshift cushion from the damaging blows of reality. Which is why it’s so important. If you can’t laugh, how do you know you’re alive?

Two sayings often come up when when people discuss the very serious business of comedy: “Dying is easy, comedy is hard” and “Comedy equals tragedy plus time.” Dying—as in bombing during a stand-up set or playing a dramatic death scene or surrendering to death’s cold embrace—may actually be easy compared to writing a joke that stirs something inside of people to make them laugh, to make them forget just how sad life is, if only for a moment. But dying isn’t actually easy. It’s not easy because it’s not funny. It’s painful and it’s sad, and there’s no time to find the funny in it. The actual dying is the tragedy. The comedy lies in the aftermath of death, in how we cope with it. Comedy, like death, is really just about the passage of time.