“Master of None” begins its second season in Italy, but one of the best episodes takes place stateside — entirely set within the same four walls. “Thanksgiving” follows Dev (Aziz Ansari) and his longtime friend Denise (Lena Waithe) over a series of Thanksgivings as Dev joins Denise’s family for dinner.

The episode, which Ansari and Waithe wrote together, features Angela Bassett as Denise’s mother, Catherine, and Kym Whitley, who plays Denise’s aunt, Joyce. Venida Evans stars as her feisty grandma. “Thanksgiving” references other people in the “Master of None” universe, but it can be watched as a standalone episode.

At the start of the episode, Dev and Denise are young kids — so young, in fact, that some of their differences are lost on them. “Do y’all even celebrate Thanksgiving at your house?” Catherine asks Dev. “Is that a thing y’all do in the Indian community?”

Denise is confused. “I thought Dev was black,” she says.

“Thanksgiving” pretty effortlessly joins the pantheon of memorable Thanksgiving episodes because it’s funny, charming and adds context to Dev and Denise’s close friendship. But the narrative is deeper than, say, Rachel accidentally putting beef in the trifle (although “Master of None” doesn’t skimp on the “Friends” references). “Thanksgiving” is also the story of Denise coming out to her family.

At that first Thanksgiving, Dev informs Catherine that his family eats lunch together, but then his father watches “The Godfather” and falls asleep — an admission that earns Dev a standing invitation to dinner. The show jumps forward to 1995 and we see Dev and Denise watching D’Angelo’s “Brown Sugar” video. “Skin is caramel with the cocoa eyes, even got a big sister by the name of Chocolate Thai,” a 12-year-old Dev squeaks.

Catherine muses that Denise is watching D’Angelo very intently, not realizing that her daughter is actually more interested in the female video models flanking the R&B singer. Melina Matsoukas, known for directing the music video for Beyonce’s “Formation” and several episodes of Issa Rae’s “Insecure,” helmed the episode and takes care to show us the posters plastered on Denise’s wall: Karyn Parsons of “The Fresh Prince of Bel-Air” fame, Jasmine Guy and, later, Jennifer Aniston.

Denise is a refreshing character on “Master of None” — and television in general. “I’ve made a living off of being my gay black self,” Waithe, a former “Bones” writer who created Showtime’s forthcoming drama “The Chi,” told Out magazine. “People really respond to this character, and I think that’s a triumph.”

Waithe told Vulture that while the episode isn’t 100 percent autobiographical, “Thanksgiving” does pull heavily from her own experience. Those posters on the wall are one example — Waithe said she gave the show’s production designers pictures of her room from when she was a teenager, in addition to photos of her mother and her grandmother’s house. “This is probably the most autobiographical thing I’ve ever written, but the cool thing is I got to play with it and lighten it up, because at the time it was heavy and scary and crazy,” Waithe told the site.

The episode does a great job of balancing humor with heavier moments. By Thanksgiving 1999, Denise is ready to tell Dev she’s a lesbian, or, as she puts it, “Lebanese.” “I’m not comfortable with the word, uh, lesbian,” she says. Dev says he suspected Denise liked girls, citing her Jasmine Guy posters. “And I have been dressing like Da Brat since preschool,” Denise adds.

But when Dev asks whether Denise plans to tell her mother, she tells him that “being gay isn’t something black people love to talk about.” “Some black people think being gay’s a choice,” she continues. “And when they find out that their kid is gay, they try to figure out what they did wrong.” The conversation stays serious for a few moments, but Dev and Denise lighten the mood by smoking marijuana and hilariously trying to hide it from her mother.

It isn’t until 2006 that Denise — home from college — comes out to her mother in an emotional conversation. “I’ve always been gay, but I’m still the same person,” Denise says. “I’m still your daughter. Nothing’s changed.” Catherine dabs tears from her eyes. “I don’t want life to be hard for you,” she tells Denise. “It is hard enough being a black woman in this world. Now you want to add something else to that?”

“It’s not like this was my choice,” Denise says. “It’s just who I am.”

Some of the tension breaks when Catherine warns Denise not to tell her grandmother. “She won’t be able to handle this,” Catherine says. “And you know how forgetful she is. You’re gonna have to come out to her every other week.” Recounting the exchange to Dev, Denise says that her mother offered no platitudes about loving her and supporting no matter what. “This isn’t an episode of ‘Growing Pains,’ ” she says. “She didn’t say none of that. But at least she didn’t disown me, ’cause that be happening.”

Downstairs, Catherine and Joyce discuss the conversation while preparing dinner. When Catherine wonders (as her daughter predicted) where she went wrong, Joyce bluntly reminds her that nothing is actually wrong: “Denise ain’t never been arrested, she in college, she keep a job and respects her elders.” Ultimately, Catherine says she just hopes Denise doesn’t bring home a white girl. “Well, honey, Becky is coming. And Megan. And Katie,” Joyce teases.

By 2015, Denise is in a relationship serious enough to warrant an awkward family dinner. And it is awkward. Catherine is standoffish with Denise’s girlfriend, Michelle, and gulps down glasses of wine while watching her and Denise exchange loving glances. But the following year, Catherine admits she misses Michelle when Denise brings home Nikki, a woman with a provocative Instagram handle that Dev delights in announcing (and repeating) across the dinner table.

The episode is refreshing in its honesty — from Denise’s coming out conversation with her mom to Catherine’s frank confessions to her sister. It isn’t until Thanksgiving 2017 that Catherine finally seems to accept that her daughter, reunited with Michelle, is gay. And for Waithe, a decade removed from her own coming out, telling a version of her own story was cathartic.

“The thing about coming out is that you never want to experience it again,” she told Out. “But to relive it in that way was very validating and freeing because at the time I thought, well, this is the end of the world, you know?”

Related: