Ramirez doesn’t really relate to Che, the most polarizing character in “And Just Like That.” But the actor is “really proud of the representation that we’ve created.”During a much-discussed “comedy concert” in “And Just Like That …,” HBO’s “Sex and the City” sequel series, the much-discussed character Che Diaz recounts the story of coming out to family members.“I stood up in the living room and I was like, ‘Family, I love you, and just want you to know that I am queer and nonbinary and bisexual,’” Che tells the audience with a serious face, before breaking into a wide smile. “And they were like: ‘That’s nice, can you move? You’re blocking the game.’”The bit was similar to how Sara Ramirez, the actor who plays Che (and who, like Che, is nonbinary and uses they/them singular pronouns), came out to their family as bisexual — except a “Harry Potter” movie was on the television instead of sports.The writers for “And Just Like That …” did not take much else from Ramirez’s life, the actor said in a recent interview. Aside from the character’s hairdo (a sleek undercut) and ethnic background (Mexican and Irish American), “I don’t recognize myself in Che,” Ramirez said.A cocky, fast-talking comic who employs Carrie Bradshaw (Sarah Jessica Parker) on a podcast about gender and sex, Che is often a conduit for the show’s original girl group (minus one) to learn about the newfangled cultural practices of New York City’s younger progressives: pronouns, sex positivity and shotgunning weed, to name a few. Most important, Che prompts Miranda (Cynthia Nixon) to explore her sexuality.The show, which will release its season finale on Thursday, has been criticized for its heavy-handed treatment of identity issues and for the occasional clumsiness of its efforts to diversify the overwhelmingly white, straight original series. (Maya Phillips, a critic for The New York Times, called those attempts “commendable but shallow.”)Che has taught the show’s original characters about modern progressive mores and been central to Miranda’s (Cynthia Nixon) sexual awakening.Craig Blankenhorn/HBO MaxChe has been a popular target of such complaints. One critic, writing in Them, a L.G.B.T.Q. news and culture website, said the character read as a “caricature” meant to “garner Diversity Wins.” The Daily Beast went further, calling Che “unhinged” and “the worst character on TV.” On social media, viewers groaned at Che’s “woke moment!” button, a podcast prop, and at the sometimes stilted dialogue. (“DM me if you wanna chill again soon, OK?” Che tells Miranda in a pivotal scene.)Others have defended the character, arguing for the importance of a nonbinary person in the show and questioning why so many were piling on Che, in particular. “People have a real problem with non-gender-conforming individuals,” the performer Lea DeLaria told The New York Post, adding: “I don’t think it’s the show’s fault. I think it’s the audience’s fault.”Speaking over video chat from New York, Ramirez, 46, said they have grown accustomed to playing roles that spark criticism and debate. For example, the sexuality of Dr. Callie Torres, the hard-charging orthopedic surgeon Ramirez played on Shonda Rhimes’s medical drama “Grey’s Anatomy” from 2006-16, was energetically dissected by the show’s fans.The ‘Sex and the City’ UniverseThe sprawling franchise revolutionized how women were portrayed on the screen. And the show isn’t over yet. A New Series: Carrie, Miranda and Charlotte return for another strut down the premium cable runway in “And Just Like That,” streaming on HBO. Off Broadway: Candace Bushnell, whose writing gave birth to the “Sex and the City” universe, stars in her one-woman show based on her life. In Carrie’s Footsteps: “Sex and the City” painted a seductive vision of Manhattan, inspiring many young women to move to the city. The Origins: For the show’s 20th anniversary in 2018, Bushnell shared how a collection of essays turned into a pathbreaking series.Ramirez — who was born in Mazatlán, Mexico, and was sent to live in the United States at 7 after their parents’ divorce — graduated from Juilliard in 1997 and quickly landed roles in theater (the Broadway musical “The Capeman”), film (the rom-com “You’ve Got Mail”) and television (the soap opera “As the World Turns”). Ramirez joined “Grey’s” not long after winning a Tony Award, in 2005, for playing the Lady of the Lake in the Broadway production of “Spamalot.”It wasn’t until after Ramirez left “Grey’s” that they came out publicly as bisexual and then, four years later, as nonbinary. In an interview, the actor discussed the appeal of the original “Sex and the City,” viewers’ reactions to Che Diaz and the pressure of coming out on TV before doing so in real life. These are edited excerpts from the conversation.You were in your early 20s when “Sex and the City” premiered, in 1998. What were your impressions of the show?I had just graduated from Juilliard. I was working professionally as an actor and falling in love with New York. So it was a perfect show. I appreciated the focus on friendships, the power of friendships and the power of personal purpose and also sexual empowerment for women.Your first high-profile TV role, Callie Torres on “Grey’s Anatomy,” exhibited a similar sense of purpose and empowerment. Did you relate to that character?I was really excited to take on a role that was very empowered, strong, but also extremely sensitive and vulnerable. I related to that due to my own upbringing and some of the trauma that I overcame. I developed a very hard shell, and I’m also extremely sensitive at the same time.Ramirez, with Ellen Pompeo, was on “Grey’s Anatomy” from 2006-16.Adam Taylor/ABCHow did Callie come to explore her sexuality in the show? Did your own experiences play a role?I knew I was bisexual from a younger age, from my teens, and it was an incremental discovery process. So living with that truth about myself was one thing; it was another thing to be working in television and slowly becoming more well known. So on the one hand, I felt a sense of pressure to come out publicly. On the other hand, I wondered if creatively I could have an impact by infusing the character I was playing with a more expansive sexuality.Were you nervous about pitching that plotline to Shonda Rhimes, the creator?I think it was a mix of comfortability with Shonda and nervousness, mixed with excitement about the unknown. If she says no, it would be disappointing — but on some level, a relief. If she says yes, it’s excitement and terror that we may get it wrong.What do you mean by getting it wrong?Just failing the community — portraying someone in a way that would be harmful to the community, that would be seen as inaccurate somehow. I think that comes with an internalization of bi-antagonism. I was conditioned to believe that there was only one way to be queer at that time.Do you remember getting feedback from viewers on the path that Callie ultimately followed?Social media hadn’t taken off when we first started exploring that journey for Callie [in fall 2007], and the only thing available were chat rooms, online forums or comments on websites. I did check it out a few times, and it was a mix of different opinions, which is great in a sense, because you want people to have opinions. I think it’s a good thing to get people talking. But I learned that it’s not a good idea to look into any of those because the opinions are vast, and as an artist, I have to protect my process.You didn’t come out publicly until after you left the show. What was it like to play a bisexual character on television but to still be struggling with whether or not to be open about your own sexuality?It was incredibly stressful. There was a lot of anxiety that I lived with — and I happened to be married to a cisgender man. Living the life of a bisexual person in real life but deep down knowing that there would be all kinds of judgments around my own sexuality was really hard to live with while portraying somebody who is in the process of becoming empowered around being with women. It was a real interesting time.“We have built a character who is a human being, who is imperfect, who’s complex, who is not here to be liked, who’s not here for anybody’s approval,” Ramirez said.Craig Blankenhorn/HBO MaxThere is less overlap between you and Che Diaz. Have you been paying attention to the criticism of the character, or have you tried to separate yourself from it?I’m very aware of the hate that exists online, but I have to protect my own mental health and my own artistry. And that’s way more important to me because I’m a real human being. I’m really proud of the representation that we’ve created. We have built a character who is a human being, who is imperfect, who’s complex, who is not here to be liked, who’s not here for anybody’s approval. They’re here to be themselves.I’m also not in control of the writing. I welcome the passion that folks are bringing to the table around this representation. But in real life, there are a lot of different human beings who show up to the table, speaking truth to power in myriad ways. And they all land differently with different people. And Che Diaz has their own audience that they speak to who really get a kick out of what they’re doing.How do you think Che would respond to this criticism?Michael Patrick King [the showrunner of “And Just Like That …”] and the writers’ room would probably answer that best since they wrote the character of Che Diaz. I imagine Che would have something very witty and silly and funny as a rebuttal; something that ultimately reminds everyone that they are human; something with a sprinkling of self-deprecation, because I think they know they’re a narcissist. And maybe just a little reminder that no one’s perfect. More