which consists of property permanently set aside for the exclusive use of an organization described in section 170(c), (C) a pooled income fund (as defined in section 642(c)(5)) or a cemetery perpetual care fund (as described in section 642(i)), (D) a settlement trust (as defined in section 646), (E) any charitable remainder annuity trust (as defined in section 664), (F) any charitable remainder unitrust (as defined in section 664), or (G) any other category of trust identified in regulations or guidance provided by the Secretary. (3) Grantor trusts (A) Grantor trust defined For purposes of this section, the term grantor trust means any portion of a trust with respect to which the grantor or any other person is considered the owner under subpart E of part I of subchapter J. (B) Assets of grantor trust taken into account For purposes of subsection (a)(1)(A), the assets of a grantor trust shall be included in the assets of— (i) the grantor of such trust if the grantor is considered the owner of such assets, and (ii) if a person other than the grantor is considered the owner of such assets, both the grantor and such person. (d) Special rules for foreign persons and expatriates For purposes of this part— (1) Nonresident alien individuals The following rules shall apply in determining whether a nonresident alien individual is an applicable taxpayer: (A) Income test For purposes of the income test under subsection (a)(2)— (i) such subsection shall be applied for purposes of this subparagraph by substituting $50,000,000 for the dollar amount otherwise in effect for such taxable year under such paragraph, and (ii) the applicable adjusted gross income of such individual shall be equal to the taxable income of such individual, determined by only taking into account items of income, gain, deduction, and loss which are effectively connected with the conduct of trades or businesses within the United States. (B) Asset test For purposes of the asset test under subsection (a)(3)— (i) such subsection shall be applied for