(a) If a derivative action is successful, in whole or in part, or if anything is received by the plaintiff as a result of a judgment, compromise, or settlement of any action or claim, the court may award the plaintiff reasonable expenses, including reasonable attorney's fees, and shall direct him to remit to the limited partnership the remainder of those proceeds received by him.
(b) In any such action, the court, upon final judgment and a finding that the action was brought without reasonable cause, may require the plaintiff or plaintiffs to pay to the defendant or defendants the reasonable expenses, including attorneys' fees, incurred by them in defense of the action. (1985 (Reg. Sess., 1986), c. 989, s. 2.)