((a)) ** Optional application to State programs** Except as provided in subsection (b), in determining the eligibility and the amount of benefits of an alien for any State public benefits, the State or political subdivision that offers the benefits is authorized to provide that the income and resources of the alien shall be deemed to include—
((1)) the income and resources of any individual who executed an affidavit of support pursuant to (as added by section 423 and as amended by section 551(a) of the Illegal Immigration Reform and Immigrant Responsibility Act of 1996) on behalf of such alien, and
((2)) the income and resources of the spouse (if any) of the individual.
((b)) ** Exceptions** Subsection (a) shall not apply with respect to the following State public benefits:
((1)) Assistance described in .
((2)) Short-term, non-cash, in-kind emergency disaster relief.
((3)) Programs comparable to assistance or benefits under the Richard B. Russell National School Lunch Act [ et seq.].
((4)) Programs comparable to assistance or benefits under the Child Nutrition Act of 1966 [ et seq.].
((5)) Public health assistance for immunizations with respect to immunizable diseases and for testing and treatment of symptoms of communicable diseases whether or not such symptoms are caused by a communicable disease.
((6)) Payments for foster care and adoption assistance.
((7)) Programs, services, or assistance (such as soup kitchens, crisis counseling and intervention, and short-term shelter) specified by the Attorney General of a State, after consultation with appropriate agencies and departments, which (A) deliver in-kind services at the community level, including through public or private nonprofit agencies; (B) do not condition the provision of assistance, the amount of assistance provided, or the cost of assistance provided on the individual recipient’s income or resources; and (C) are necessary for the protection of life or safety.