(a) Notwithstanding any provision in the laws of this state or in the governing instrument to the contrary, except as provided in subsections (c) and (d) of this section, the governing instrument of each trust which is a private foundation as defined in section 509 of the Internal Revenue Code of 1954, including each nonexempt charitable trust as defined in section 4947(a)(1) of the code which is treated as a private foundation, and the governing instrument of each nonexempt split-interest trust as defined in section 4947(a)(2) of the code, but only to the extent that section 508(e) of the code is applicable to a nonexempt split-interest trust under section 4947(a)(2) of the code, shall be deemed to contain the following provisions: “The trust shall make distributions at such time and in such manner as not to become subject to the tax on undistributed income imposed by section 4942 of the Internal Revenue Code of 1954; the trust shall not engage in any act of self-dealing (as defined in section 4941(d) of the code) which would subject it to tax under section 4941 of the code; the trust shall not retain any excess business holdings (as defined in section 4943(c) of the code) which would subject it to tax under section 4943 of the code; the trust shall not make any investments in such manner as to incur tax liability under section 4944 of the code; and the trust shall not make any taxable expenditures (as defined in section 4945(d) of the code) which would subject it to tax under section 4945 of the code.”
(b) With respect to any such trust created prior to January 1, 1970, subsection (a) of this section shall apply only for its taxable years beginning on or after January 1, 1972.
(c) The provisions of subsection (a) of this section shall not apply to any trust to the extent that a court of competent jurisdiction shall determine that the application would be contrary to the terms of the instrument governing the trust and that the terms may not properly be changed to conform to subsection (a) of this section.
(d) The trustee of any trust described in subsection (a) of this section, with the consent of the trustor if he or she is then living and competent to give consent, without judicial proceedings, may amend the trust to expressly exclude the application of this section by executing a written amendment to the trust and filing a duplicate original of the amendment with the Attorney General, and upon filing of the amendment, subsection (a) of this section shall not apply to the trust.
(e) Nothing contained herein shall impair the rights and powers of the courts, or any officer, agency, or department of this state, with respect to the trust.