Somewhere between Juno and Ricki and the Flash, we got Diablo Cody wrong. The 37-year-old former stripper — who catapulted to fame when she took an Oscar for her Juno screenplay back in 2007 — declared last week that she was "done with directing" after the critical flop of her 2013 VOD debut, Paradise. On a practical level, that means Cody fans have one hope: that her new script will pique the interest of a director who truly understands her sensibilities.

Until this summer's Ricki and the Flash, which was directed by Jonathan Demme, that had never quite happened. The heart of Cody's stories lie in the details, but her previous directors — Juno and Young Adult's Jason Reitman, Jennifer's Body's Karyn Kusama — tend to simplify her work. Cody's unique gift is her ability to pack progressive politics into conventional story structures, but it's neither impossible nor unheard of to read Cody's scripts as conservative: Juno as pro-life screed; Jennifer's Body as slut-shaming; Young Adult as misogynist.

Those misreadings aren't rooted in Cody's scripts; they're rooted in the ways her directors have framed her material. Juno is as far from pro-abstinence as it gets, and Cody's script is clearly critical of the circumstances that shame its protagonist away from abortion. But Reitman rushes through what is clearly intended, on the page, as a pivotal scene. He makes the same mistake in Young Adult, treating indicators of Mavis' (Charlize Theron) mental illness as puzzling asides to be worked around, despite a scene in which Cody makes those problems explicit, as Mavis laments that nobody cared about her mental illnesses until they directly hurt someone else.

Karyn Kusama fares a little better with the horror-comedy Jennifer's Body (2009), in which Jennifer (Megan Fox) and the narrator get revenge on hyper-masculine jerks who misuse their status as popular musicians to attract women. But again, something is lost in the translation, as Kusama's inability to generate real scares makes it easy to miss that Cody is working within the tropes of horror films to diagnose and dispense with negative social forces.

With a long history of having directors treat Cody's natural progressivism as an afterthought, it shouldn't be a surprise that 2015's Ricki and the Flash is not the conservative-leaning film it might, at first glance, seem to be: the story of an independent woman who finally becomes the mother she always should have been. Instead, Ricki and the Flash is about a woman who, for a brief moment, becomes Mick Jagger.

The film follows Ricki (Meryl Streep), a singer-guitarist in a cover band who left her husband and three children 25 years prior to pursue her rock-star dreams. Ricki returns home to visit her all but estranged family after her daughter Julie's suicide attempt. Though Ricki's presence actually helps Julie in her recovery, the rest of her family quickly sends her packing.

It's here that Ricki and the Flash tips its hand. Not only does Demme's comical and touching depiction of Ricki's alleged wrongdoings minimize any hand-wringing about her "bad influence," but his presentation of a key scene shortly thereafter emphasizes his allegiance with Ricki. Why is it, Ricki asks an attentive crowd, that a man like Mick Jagger — who has seven children by four different women — is forgiven for failing as a parent, but a woman who does the same thing is branded a monster? Demme doesn't overlook the comedy of Ricki comparing herself to a global rock star, but his use of reaction shots — first of sympathetic women, then of dismissive men — shows that his sympathies align with Cody's.

The film eventually finds Ricki (along with bandmate/boyfriend Greg and the rest of The Flash) performing a rousing rendition of Bruce Springsteen's "My Love Will Not Let You Down" at her son's wedding, which nobody wanted her to attend. How rousing? The groom forces his new wife to make it their first dance. His gay brother forgives their mother's homophobia. It even manages to shake Julie out of her depression.

Where Demme gets it right — and where his directorial predecessors may not have — is that he doesn't boil this scene down to Ricki embracing, or even returning, to a prescriptive role as mother/caregiver. Demme shoots the performance like something to behold in itself, and not just a plot device designed to bring Ricki and her family together. Instead of a conservative resolution, we have a call back to Ricki's Mick Jagger speech, as she too is finally forgiven for her domestic shortcomings.

Demme, unlike Cody's previous directors, understands the way music can transform and elongate moments. When you recall how Reitman had Juno talking over Sonic Youth's rendition of "Superstar" after listening to a line or two, or his refusal to let us actually see people connect with Teenage Fanclub's "The Concept" in Young Adult, it's hard not to wish Demme had been at the helm.

That Demme pulls this off despite Ricki being one of Cody's weaker scripts is something of a marvel. Its jokes are telegraphed, repetitive, never as funny as Juno's best lines or as wry and clever as Jennifer's Body. Nonetheless, Demme understands what Cody is actually saying better than her previous collaborators. His own understanding of music and family, visible throughout his oeuvre, matches Cody's. He uses cinema's language — reaction shots, shot duration, silence, and more — to tap into Cody's progressivism in a way that her previous collaborators have not. And in doing so, he brings her voice forward in the way it always should have been.