During any period when a trust is considered to be a charitable trust or a private foundation, the trustee shall distribute its income for each taxable year (and principal if necessary) at a time and in a manner that will not subject the property of the trust to tax under section 4942 of the Internal Revenue Code.
§ 72-38-821, MCA