§ 121-1003. Security for expenses. In a derivative action, brought pursuant to section 121-1002 of this article, unless the contributions of or allocable to the plaintiff or plaintiffs amount to five percent or more of the contributions of all limited partners, in their status as limited partners, or such contributions of or allocable to such plaintiff or plaintiffs have a fair value in excess of fifty thousand dollars, the limited partnership in whose right such action is brought shall be entitled at any stage of the proceedings before final judgment to require the plaintiff or plaintiffs to give security for the reasonable expenses, including attorney's fees, which may be incurred by it in connection with such action and by the other parties defendant in connection therewith for which the limited partnership may become liable under this article or under any contract or otherwise under law. The limited partnership shall have recourse to such security in such amount as the court having jurisdiction of such action shall determine upon the termination of such action. Notwithstanding the first sentence of this section, the amount of any security may from time to time be determined in the discretion of the court having jurisdiction of such action, even if the five percent of contributions or fifty thousand dollar value test is met, upon a showing of the need therefor.