[Warning: This story contains spoilers from the third episode of Master of None's second season, "Religion."]

Master of None managed, in only one season, to develop a sterling reputation for its interest in tackling thorny topics in ways that always feel human and never melodramatic. In its second season, it takes on yet another ambitious subject: protagonist Dev's religious background.

Given the current political climate, delving into a character's practice of Islam could easily take on a heavier tone, but co-creators Alan Yang and Aziz Ansari instead explored the subject of religion through the lens of parental disappointment. It's the sort of story that people across many faiths experience: How do parents and their kids cope when the next generation becomes more secular?

THR talked to Yang about how they decided what to include in the episode and whether any of their plans changed after the election.

When it came to the stand-alone episodes, how did you decide what stories you wanted to tell, whether it was the "Religion" episode or the "New York I Love You" episode?

I had always wanted to do a religion episode, and we had talked about it. I just thought it was an interesting world for us to be in because Aziz's real family is Muslim and his parents go to mosque, and he's not really religious himself, but I found that interesting. My parents aren't religious, so I just didn't have a familiarity with it. … It's just a character trait that he has a relationship with his parents that I haven't seen depicted very often on television, if at all.

We never really could crack it in season one, and so we really tried to get into it for season two. Aziz started to get way more into the idea, and we were like, let's just buckle down and try to crack this one. And what it ended up boiling down to was this really funny real-life anecdote where he decided to eat pork in front of his parents. That's a real thing that happened, and so he had to explain to them — it's telling your parents who you are in some ways. And like we mention in the episode, it can feel like a rejection sometimes, whether you're Jewish or Presbyterian or Muslim. You're not living your life exactly how your parents lived theirs. I think that's the fundamental conflict in the episode. It's not really about Islam in some ways.

It's more about parents and how you tell them that you're not the person that they thought you were.

Yeah. And it's about them learning to communicate with you too.

Were Aziz's parents involved in any of the storytelling decisions? Did he talk to them at all about their emotions about his decision to eat pork in front of them?

Yeah, we tried. We definitely tried. The biggest emotional story in that episode is between Aziz and his mom. Aziz would call his mom and really just try to talk to her about it. I know she hates acting on the show, and I don't know how much she likes consulting on story, but some of that stuff — there's a letter that she writes — some of that stuff comes from her. And by the way, his cousin in the show, the character of Navid, is played by his real cousin Harris, who used to be mentioned in his stand-up all the time. Aziz used to have a bit in his stand-up about his little chubby cousin Harris, and it was this big bit in his stand-up, and people even made shirts with Harris' face on it. And Harris is now a very handsome 25-year-old man.

That's chubby Harris?

Yeah. He's, like, jacked now. And he had never acted before, so we were like, "We gotta really guide Harris through this." And he did a good job. Harris — he's actually a little more religious than Aziz and Aniz [Ansari, Aziz's brother], and so we asked Harris, "What do you like about Islam, and what does religion mean to you?" And we used some of his answers in his real-life dialogue. The goal is to make it feel real, and that's some of these performers' real thoughts.

Even if this episode is about parenting, it's also about being Muslim in America, and obviously there's a little bit of a microscope on that experience right now. Do you feel that as you're working on that episode, or are you able to separate from thinking about that while you're creating it?

This is the crazy thing. That episode was written entirely before Donald Trump was really even a serious candidate for president. We write the entire season before we shoot. And so that was in the can. It was done, writing-wise. And then we started shooting it, and then the Trump thing became very real. And by that time, he had insisted that he would institute a ban on all Muslims from entering the country, and he had insisted that he would build a wall separating the United States from Mexico, and he had made all these crazy claims.

I think the day after election day a lot of people on the crew were very surprised at what had happened. In kind of a terrible coincidence, one of the first scenes up the next morning, I think it might have been the second scene, 8 a.m., we're shooting in Brooklyn somewhere, and the scene was a flashback to Dev's character post-9/11 walking around New York crossing the street, and a guy from a car impatiently screaming, "Hurry up, terrorist" at him when he crosses the street. This is something that actually happened to Aniz and Aziz in that era. And so we're shooting this scene, the morning after Trump's elected, and I was directing the episode, and I had to tell the guy, "Hey, man, can you scream 'hurry up, terrorist' angrier? Can you be way more angry when you scream 'hurry up, terrorist'?"

No one was feeling great about a lot of things going on. It was really strange. We were all a little bit shaken at that point in time, for sure. And we discussed whether we wanted to rewrite the episode. We discussed whether we wanted to put a section in that directly addressed the fact that the United States had just elected a president who wanted to ban all Muslims from entering the country and possibly get rid of the ones who were already in the country, which would among them number Aziz's parents.

We talked about it because we were angry. We didn't like that rhetoric. It didn't seem right to me that this guy was talking about banning an entire religion of people, some of whom I count among my friends. So we talked about it, and we actually came up with some ideas for montages that we would put in, but it just all felt off-tone, and it felt like that wasn't what the episode was, and the episode was written and it was of a piece, and the point of it was not that we were angry at Donald Trump — not everything is about Trump. Not everything is about his hatred. It exists on its own. I think it works in the current context of the world, and I think it works outside of that context as well.

Master of None's entire second season is streaming now on Netflix.