District attorneys within their respective districts shall appear for the commonwealth in the superior court in all cases, criminal or civil, in which the commonwealth is a party or interested, and in the hearing, in the supreme judicial court, of all questions of law arising in the cases of which they respectively have charge, shall aid the attorney general in the duties required of him, and perform such of his duties as are not required of him personally; but the attorney general, when present, shall have the control of such cases. They may interchange official duties.
Mass. Gen. Laws ch. 12, § 27