 MGM studio head Louis B. Mayer assigned the script to Donald Ogden Stewart — one of his favorite screenwriters . Mayer 's choice seemed unusual , because up to that time Stewart had written only light romantic comedies featuring wealthy East Coast socialites , but Mayer felt Stewart 's strongly leftist political leanings would enable him to chalk out a better screenplay . 
