Photo: Stefania Rosini/Vulture

Rebecca Bunch is in a cheerleader outfit, a picture of a douche bottle imprinted on her chest. She’s chanting “Makey Makeover,” her anthem for the head-to-toe transformation she’s about to undergo, as she herky-jumps and shakes her poms-poms. At the end of the short tune, which will be featured in Friday’s episode of Crazy Ex-Girlfriend, Rebecca malfunctions, singing: “I had a stroke, I had a stroke, I had a stroke,” before falling down on the floor. Star Rachel Bloom performs this routine multiple times on an August afternoon, nailing the fall every time as Emmy-winning choreographer Kathryn Burns eggs her on from the sidelines. “Believe me, I’ve died in about four music videos,” Bloom assures director Paul Briganti. “I know how to slowly die.”

The collapse doesn’t make the episode’s final cut. During the editing process, producers decided it was best to end the energetic number on a slightly more uplifting note, showrunner Aline Brosh McKenna told Vulture. Instead of her collapsing, the song ends with Rebecca’s perky delivery of “I had a stroke” and a close-up on her big, disturbed smile.

How did Rebecca get to this point? After her love triangle came to an abrupt end in last week’s episode when Greg (Santino Fontana) decided to pursue his MBA dreams in Atlanta and Josh (Vincent Rodriguez III) moved out, Rebecca decides the ideal antidote would be a makeover.

Once the writers chose to give Rebecca a makeover montage in the episode, Bloom and Brosh McKenna decided to pair it with a song. “We knew we wanted something like, Oh Mickey, you’re so fine, something spastic and catchy,” Bloom said. The lyrics came to her in a matter of minutes while sitting in the writers room. “It’s a great example of a Rachel Bloom song,” said Jack Dolgen, a writer and songwriter on the show. “It has a super high-energy spirit but it makes fun of a certain aspect of our culture and has some hard jokes in it.”

A story board for the makeover song. Photo: Stefania Rosini

Photo: Stefania Rosini

Bloom dashed off a quick recording of “Makey Makeover” on her iPhone and sent it to Adam Schlesinger, the other songwriter on the show. “It’s kind of a mini-song compared to our other songs,” he said. “Rachel’s really good off the cuff, so this one is one that she just had in her head. Her first instincts are amazing. My role was putting some chords behind it and building a track. We nailed it pretty quickly because it was pretty obvious what she had in mind.”

So why is the song’s kicker about having a stroke? “I’ve done stroke-related humor before,” Bloom said. (Dolgen and Bloom have worked together for six years, and for their first album, they wrote a song called “Thug Stroke.”) “On my SNL audition tape — spoiler alert, they didn’t accept me — there was a character that was like a manic pixie dream girl that just keeps dropping shit and then she’s like, I’m having a stroke. I’m having a stroke,” she continued. “So I associate that kind of upbeat parody of what a woman is to someone having a seizure. But here’s the thing — I’m not a 1,000 percent clear on what a stroke really is.”

“We don’t want to look into it,” Dolgen piped in. “It’ll ruin the joke.”

“Makey Makeover” plays over a montage of Rebecca undergoing an extensive transformation — hair, long nails, makeup, and wardrobe. Bloom dyed her hair blonde and then added extensions, which took over three hours. Body makeup — not a spray tan — gave her a sun-kissed look. Applying that and her makeup and styling added another two-and-a-half hours. Costume designer Melina Root picked out about ten outfits, but landed on a paisley-print leotard, sparkly belted top, denim shorts, black suede vest and sparkly jewelry that Rebecca sports once the makeover is complete.

Photo: Stefania Rosini

Photo: Stefania Rosini

Photo: Stefania Rosini

Root was inspired by something Heather (Vella Lovell) says in a scene that was also deleted in editing. In it, she describes Rebecca’s new look as: “A Hells Angel had sex with the Urban Outfitters bargain bin, they had a baby, homeschooled it in a barn for 18 years, and sent it to circus camp.”

“Those words said it all to me. She looks ridiculous!” Root said. “I love her hair. I’m really excited about her hair. This is her most pathetic version of Boho Chic.”

When Bloom initially dyed her hair, her plan was to spend the rest of the season as a blonde. “We’ve always liked the idea because it’s a symbol of California swallowing her whole and her trying on these new identities and trying to become a new person in her search for happiness,” she said in August.

But after a couple of days living with the millennial-Instagram-selfie-inspired look, she and Brosh McKenna changed their minds. Bloom said her “discomfort” worked for the episode but she worried her appearance would be too jarring for later story lines. Dolgen joked that the look reminded him of the moms of “everyone I went to high school with in Phoenix.”

“The problem is that Rachel is so pretty that with blonde hair, she was sort of distractingly pretty and she lost her identity for us, just walking around the set,” Brosh McKenna said. “It was quite unsettling for everybody because she’s obviously very pretty, but her glamour is a more accessible glamour. It wasn’t her, and it certainly wasn’t Rebecca Bunch.”