EXCLUSIVE: Sony Pictures has set Diablo Cody to write the next draft of Barbie, the live-action film based on Mattel’s top-selling fashion doll that the studio believes will anchor a global film franchise. The studio made a deal awhile back with Mattel and Parkes+MacDonald/Image Nation for the comedy, and had Jenny Bicks write the first draft. Walter Parkes and Laurie MacDonald are producing, and they recently invited Amy Pascal to join them.

Cody is an intriguing choice. The spirit of the doll is all about female empowerment, and Cody is a famous example of someone who pulled herself up to become the Oscar-winning screenwriter of Juno. But Barbie is also somewhat squeaky clean in her image, and Cody’s rags-to-riches story famously starts with her working as a stripper, and then writing a blog about her life which led to her breaking into the ranks of A-list screenwriters. Her work from Jennifer’s Body to the Jason Reitman-directed Young Adult to her directing debut Paradise were all edgy efforts.

Parkes said that was exactly why she was perfect to take the project to the next step. “Diablo’s unconventionality is just what Barbie needs,” he said. “It signals we’re going for a legitimately contemporary tone. We’re bringing her on because she had great ideas, but even more importantly, she truly loves Barbie.” This is one of a couple of priority projects Parkes and MacDonald have at Sony; they are also rebooting Men In Black. The exec producer is Julia Pistor for Mattel’s Playground Productions. Hannah Minghella and Lauren Abrahams are steering for the studio.

Related Story Sony Pictures Teams With Mattel To Fashion Film Franchise Based On Barbie Toyline

The producers and studio are determined to get the tone right, much the way that Warner Bros did with The LEGO Movie, which had a cool factor and sense of fun. The theme of empowerment overrides the fashion accessories that have been a staple of a $3 billion-a-year toy brand. Barbie uses her personal and professional skills to step into the lives of others and improve them, almost like a modern-day Mary Poppins. That storyline allows for the discovery of a young actress to play the title character, and young cast to play Ken and Barbie’s best friend, putting stars around them that can change in subsequent movies, a formula that allows for affordable sequels. This is one of two Sony projects with Mattel, the other being Masters Of The Universe.

Cody is repped by WME and manager Mason Novick.