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 such action, the court may award the plaintiff reasonable expenses, including reasonable attorneys' fees. If anything is so received by the plaintiff, the court shall make such award of plaintiff's expenses payable out of those proceeds and direct plaintiff to remit to the limited partnership the remainder thereof, and if those proceeds are insufficient to reimburse plaintiff's reasonable expenses, the court may direct that any such award of plaintiff's expenses or portion thereof be paid by the limited partnership.