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