Tony Soprano (James Gandolfini) had just finished detailing the sorrow and helplessness he felt over his son’s depression when the tears welling up in his eyes turned to seething anger. “It’s in his blood,” the sensitive mob boss told his psychiatrist (Lorraine Bracco) in a memorable Season 6 episode. “My rotten … putrid genes have infected my kid’s soul. That’s my gift to my son.”

Though fictional, the scene — like many that took place in the office of Tony’s shrink, Jennifer Melfi — resembled dialogue you might encounter in a real-life therapy session. That was especially true of what followed. “I know this is difficult but I’m very glad we’re having this discussion,” Dr. Melfi told Tony.

“Really? Because I got to be honest, I think it … sucks,” Tony replied, noting in harsh language that he hates therapy. “After all the complaining and the crying … is this all there is?”

It’s been more than 20 years since Tony reluctantly sat down in Melfi’s office, where he was referred after suffering a panic attack. And although “The Sopranos” wasn’t the first TV series to feature a therapist character, many practitioners cited it as a refreshingly authentic representation of what therapy actually is. Before the hit HBO series, TV therapists tended to fall into two categories, said Glen Gabbard, clinical professor of psychiatry at Baylor College of Medicine. “You were either a buffoon or a killer.”

Tony’s competent and compassionate shrink set a new standard — one Gabbard explored in his 2001 book “The Psychology of ‘The Sopranos.’ ” “They did something that was pretty daring, which was to show a mob boss taking psychotherapy seriously,” said Gabbard, who also served as a consultant on the six-season series. Bracco, he added, “did a very good job of showing a good therapist at work but also someone who was human and gets worried and fears for her life.”

In recent years, therapist characters have proliferated across television, in part because of increasing mental health awareness among TV creators and the larger entertainment industry. But not all TV therapists are created equal: In the decades since Tony started his weekly sessions, we’ve seen portrayals that strike similar authenticity, a few that push boundaries and others that resort to harmful tropes.

Here’s a look at some of the most notable portrayals — on both sides of the spectrum — over the past two decades.

“Monk” (2002-2009)

Mental health experts have taken issue over the years with “Monk’s” portrayal of obsessive compulsive disorder. Among the most common critiques of the USA Network show: the symptoms Adrian Monk (Tony Shalhoub) experienced resembled other mental illnesses and medicine was presented as a cure-all (and one that, in a potentially harmful message, made Monk a different person). But Monk found compassionate and regular care in his therapists — Charles Kroger (Stanley Kamel) and, after Kamel’s death in 2008, Neven Bell (Hector Elizondo).

“In Treatment” (2008-2010; 2021)

The first three seasons of HBO’s “In Treatment,” an Israeli series adaptation that premiered in 2008, center on Paul Weston (Gabriel Byrne) and his revolving roster of patients. The verdict on Weston is that he was warm, compassionate and perhaps a little too loose with doctor-patient boundaries. (“In Treatment Is Great T.V. But Terrible Psychotherapy,” one expert opined in Psychology Today.) The fourth season, which premiered earlier this year, follows Weston’s mentee Brooke Taylor (Uzo Aduba).

Aduba’s run quite literally brings the show into the present: She sees some of her patients virtually, has a diverse client list and even takes on a pro-bono patient. But the character also has her own problems, as she struggles with addiction and the death of her father.

That’s one strength of “In Treatment” 2.0. Aduba told NPR the role helped her better understand “the weight” of being a therapist: “We don’t know what they’re going through in their own lives and how much of whatever it is that you’re bringing into the room echoes what they’re going through.”

“Crazy Ex-Girlfriend” (2015-2019)

Leave it to Rebecca Bunch (Rachel Bloom) to forge a longtime relationship with the psychiatrist from whom she once tried to steal a prescription pad. But Noelle Akopian (Michael Hyatt) was dedicated to helping Rebecca with her diagnosed borderline personality disorder. Their sessions sometimes included simple but powerful moments like the time Akopian told Rebecca she needs and deserves love.

The character, however, veers a bit too much into “Black Lady Therapist” territory, a term coined by writer Aisha Harris to denote TV’s disproportionate number of Black female therapists who exist on shows solely to help White characters. The trope is especially evident in the CW series’ finale, when Dr. Akopian manifests not as Rebecca’s therapist, but as a “dream ghost” who shows Rebecca what her future would look like with each of the three men she loves.

“13 Reasons Why” (2016-2020)

Nicola Pierre-Smith, a licensed professional counselor in Philadelphia, cites Netflix’s young adult drama as a bad therapist portrayal. In addition to the graphic suicide scene that was later deleted from the series, the show was criticized for a troubling scene between protagonist Hannah (Katherine Langford) and a school guidance counselor (Derek Luke), whom she goes to for help. He dismisses her concerns, insinuates she may have somehow played a role in her own sexual assault and does nothing to assuage her when she alludes to suicidal thoughts.

Suicide prevention advocates worried that portrayal sent a harmful message to teens about seeking treatment, and it was one of the many issues the show attempted to course correct over its four seasons: One prominent later story line found Clay (Dylan Minnette) in regular sessions with an insightful therapist played by Gary Sinise.

“Insecure” (2016-present)

When the fifth and final season of HBO’s “Insecure” premiered last month, we could see the growth Molly (Yvonne Orji) has undergone since returning to the stylish office of Rhonda Pine (Denise Dowse). Molly first entered therapy in the Season 2 premiere and spent much of that first session trying to pretend that her life was absolutely fine. She later told her BFF that she liked having a Black therapist after seeing some practitioners who were less than culturally competent.

Eventually, Dr. Rhonda was able to get Molly to open up — and to take note of how often Molly said she should do or have something in a relationship or job setting. But even in the third season, Molly was still withholding information from her therapist and she took a long break between sessions before calling at the end of Season 4 because she had been having “a hard time.”

Pierre-Smith said she would have liked the show — and more shows in general — to provide more details on how Molly went about finding a therapist. In “Insecure,” “the therapist just kind of pops up. We don’t get any details,” Pierre-Smith said. “What was the process of finding, especially, a Black therapist?”

“Normal People” (2020)

In Hulu’s adaptation of Sally Rooney’s acclaimed novel, Connell (Paul Mescal) seeks help for his worsening depression after the sudden death of a childhood friend. The scene got a lot of praise for what it got right: showing that it’s possible to find and receive help while upending stigmas around men opening up about their feelings. And it certainly reflected Rooney’s narrative. But “Normal People” also highlights the circumstances in which therapy tends to be portrayed on TV.

“A realistic portrayal should convey that therapy isn’t required only when there is a crisis situation at hand, and that therapy can be used as a proactive, self-maintaining strategy,” said Pierre-Smith.

“Never Have I Ever” (2020-present)

[In our best John McEnroe voice] Devi Vishwakumar (Maitreyi Ramakrishnan) is a teenage girl still reeling from the death of her father. Jamie Ryan (Niecy Nash) is a thoughtful therapist who challenges Devi to truly explore her feelings. She is also quick to call Devi out when she isn’t her best self, such as the time she spread a hurtful rumor about Aneesa (Megan Suri). “I am on your side, Devi,” Dr. Ryan tells her. “But that means being honest with you and dunking on you when it’s appropriate.”

Nash used her own experience in taking on the Netflix show’s recurring character. “I’ve been in therapy probably a little over two years now, right at two years, and it’s such a valuable asset,” Nash told the Daily Beast last year.

“Blood & Water” (2020-present)

Pierre-Smith cites “Blood & Water” as a particularly troubling portrayal of a therapist. Though groundbreaking in other ways, the South African teen drama offers a malicious portrayal of a private school counselor in Janet Nkosana (Zikhona Sodlaka). Janet is brought in during the Netflix show’s second season to help Fikile (Khosi Ngema) after a traumatic series of events, but she has the ulterior motive of trying to figure out what Fikile knows about an alleged crime. She persuades the school headmistress to also let her treat Puleng (Ama Qamata), who shares a close, if often adversarial, relationship with Fikile — but again, her goal is to obtain information that could be used to harm her young patients.

Though Janet is called out by her son (a love interest for Fikile) over her duplicitous approach, Pierre-Smith said it is not the same as being called out by an industry colleague or an authority figure at the school. “He’s not in a therapeutic relationship with her,” Pierre-Smith said. “He wasn’t challenging for that purpose. He was challenging her within the parent-child relationship.”

“Ted Lasso” (2020-present)

The second season of Apple TV’s beloved comedy “Ted Lasso” introduces Sharon Fieldstone (Sarah Niles), a sports psychologist who helps Ted (Jason Sudeikis) realize that his sunny disposition can’t solve every problem. And yes, she’s a Black woman, but as Harris discussed recently on NPR’s “All Things Considered,” Sharon is among the characters adding depth to the trope.

“She does help the show take a turn toward more complex themes, unveiling Ted’s layer of artifice as a happy-go-lucky dude,” Harris wrote on NPR’s website. “But that process also fully involves her as a human being who’s bringing in her own baggage.”

Sharon addresses that baggage as a real-life therapist might — in sessions with her own therapist.

“Mare of Easttown” (2021)

The hit HBO series revolves around a grim, twist-filled murder mystery, but is also very much about grief. Mare (Kate Winslet) plays a police detective struggling with the loss of her son, who died by suicide. Early in the series, the police chief orders Mare to see a counselor to truly deal with the magnitude of her loss. Enter Gayle Graham (Eisa Davis), who helps Mare unpack her unprocessed grief and guilt over her son’s death.

Though Mare argues that therapy won’t “work” for her during their first session, she continues to see Gayle even after she is cleared to return to the force. Mare’s therapy sessions build toward a moment of healing when she is able to find some closure around her son and how he died. “The therapist did a good job of conveying her compassion for her patient,” Gabbard said.

That may be because “Mare of Easttown” relied on insight from a real-life therapist who specializes in grief. In an interview with the Hollywood Reporter, creator Brad Inglesby credited consultant Ariel Stern — who was also on hand for scenes between Davis and Winslet — with helping him come up with the series’ powerful ending, which finds Mare finally confronting her grief.

Though Davis’s character resembles the Black Lady Therapist trend, the portrayal gets a lot of things right.

“Run the World” (2021-present)

This exciting new Starz dramedy from creator Leigh Davenport and executive producer Yvette Lee Bowser (“Living Single”) earned praise for its sixth episode, which found all four of its leading ladies in therapy. “What we do as writers and storytellers is provide cultural mirrors, so we wanted society to see themselves being able to go to therapy and be comfortable with that,” Bowser told Variety earlier this year.

In what was initially a coincidence, all four see the same straight-talking therapist (played by Rosie O’Donnell). Some fans were undoubtedly surprised to see the Harlem-based foursome — Ella (Andrea Bordeaux), Whitney (Amber Stevens West), Sondi (Corbin Reid) and Renee (Bresha Webb) — going to a White therapist. But with Black psychologists amounting to roughly 4 percent of the workforce, it’s not unrealistic to think the women of “Run the World” might have trouble finding a therapist who looks like them.

At the same time, it’s important to show that it’s not impossible to find a Black therapist. Pierre-Smith said one thing TV shows can do is to incorporate real-world “barriers to entry,” such as high costs or the lack of visibility for therapists of color. Best-case scenario: the show highlights how one might overcome those barriers.