(a) In case of an individual. If any of the income derived by an individual from a trade or business (other than a trade or business carried on by a partnership) is community income under community property laws applicable to such income, all of the gross income, and the deductions attributable to such income, shall be treated as the gross income and deductions of the husband unless the wife exercises substantially all of the management and control of such trade or business, in which case all of such gross income and deductions shall be treated as the gross income and deductions of the wife. For the purpose of this special rule, the term “management and control” means management and control in fact, not the management and control imputed to the husband under the community property laws. For example, a wife who operates a beauty parlor without any appreciable collaboration on the part of her husband will be considered as having substantially all of the management and control of such business despite the provision of any community property law vesting in the husband the right of management and control of community property; and the income and deductions attributable to the operation of such beauty parlor will be considered the income and deductions of the wife.
(b) In case of a partnership. Even though a portion of a partner's distributive share of the income or loss, described in section 702(a)(9), from a trade or business carried on by a partnership is community income or loss under the community property laws applicable to such share, all of such distributive share shall be included in computing the net earnings from self-employment of such partner; no part of such share shall be taken into account in computing the net earnings from self-employment of the spouse of such partner. In any case in which both spouses are members of the same partnership, the distributive share of the income or loss of each spouse is included in computing the net earnings from self-employment of that spouse.