Director Tim Burton agreed , and Lavigne `` wrote the song immediately '' on her piano .
Discussions between Lavigne 's manager and film executives took place , and director Tim Burton agreed to let Lavigne write the song . Lavigne stated , `` I got off the phone , sat down at my piano at home , wrote the song immediately ; I was so inspired because I 'd been designing for the movie ( ... ) so I had all the images in my head . ''