The Sex and the City episode Keeley was watching serves as a foil for one of Ted Lasso's season 2, episode 7 subplots. The latest Ted Lasso episode follows in the same vein as most of its second season, characterized by poignant character development over season 1's unrelenting sentimentality. While its debut season was roundly praised, Ted Lasso season 2 is morphing into more of an acquired taste in equal parts due to its new release format and more testing emotional spectrum.

Ted Lasso season 2, episode 7, "Headspace" converges on several plotlines; Ted (Jason Sudeikis) continues his internal turmoil as he weighs the merits of therapy, while Nate (Nick Mohammed) also goes through his own ego's transformation. Yet the standout plotline of "Headspace" is Keeley's (Juno Temple) and Roy's (Brett Goldstein) first major relationship speedbump, in which the two cannot seem to untangle their daily lives from one another, resulting in their first big fight.

Related: Ted Lasso Season 2: Every Rom-Com Easter Egg In Episode 5

In "Headspace," Keeley is watching an episode of Sex and the City - "The Good Fight," in which Carrie Bradshaw's relationship struggles mirror those of Keeley's. "The Good Fight" is used as a parable for Keeley's pent-up frustration while also adding credence to her annoyance with Roy, with Carrie's emotional explosion at Aidan laying the framework for Keeley's similarly structured verbal tirade.

Roy apologizes to Keeley while she's sitting down in Ted Lasso.

"The Good Fight" adds weight to Keeley's frustrations with Roy Kent in Ted Lasso, which previously were perceived as somewhat trivial by both Keeley and her confidant Rebecca (Hannah Waddingham). Keeley's annoyance slowly builds throughout "Headspace," with Roy seemingly attached at her hip, whether at home or the AFC Richmond complex. In Sex and the City's "The Good Fight," Carrie becomes increasingly angered at her boyfriend Aidan's clutter in their apartment after he moves in, culminating in a huge fight in which Carrie screams, "I need space." While Keeley initially struggles in "Headspace" to articulate how she feels to Roy, "The Good Fight" acts as a vehicle for her frustration, with her anger building in tandem with Carrie's on-screen ire before she similarly tells Roy she needs space from him.

Ted Lasso is no stranger to romantic comedy to convey an overarching message, exemplified by season 2, episode 5, littered with rom-com references designed to display Roy's enduring affection for AFC Richmond. However, in "Headspace," Sex and the City is deployed differently to act as a mirror in which Keeley can define the issues she has in her relationship. The Ted Lasso showrunners adding this parallel for Keeley is essential to ensuring audiences empathize with her exasperation, while also showing Roy's vulnerability surrounding his girlfriend. Keeley and Roy's current relationship is far less tumultuous than Carrie and Aidan's on-again, off-again rollercoaster romance, with the pair reconciling at the end of "Headspace." With Roy realizing Keeley needs space to unwind, Ted Lasso fans will hope the next Sex and the City reference is akin to Carrie finding Big in Paris rather than Aidan's unwieldy clutter.

Next: Ted Lasso Fact Check: Would Nate's Late Substitutions Work In Real Football