Statement for making Non-Resident Spouse as Resident Alien

what kind of statement one need to sign along with the spouse to treat the non-resident spouse as resident alien while filing tax returns as "married joint filing" ?  Is this statement any official form on the IRS site or just need to sign a normal statement ? Can it be done while visiting IRS office for ITIN application for the spouse ?