In any action or proceeding instituted or maintained by partners holding transferable interests entitled to receive less than 5% of any distribution by a limited partnership, unless the transferable interests held by the partners have an aggregate fair market value in excess of $200,000, the partnership in whose right the action or proceeding is brought shall be entitled at any stage of the proceedings to require the plaintiffs to give security for the reasonable expenses, including attorneys' fees, that may be incurred by the partnership in connection therewith or for which it may become liable pursuant to section 8648(b) (relating to reimbursement, indemnification, advancement and insurance) to which security the partnership shall have recourse in such amount as the court determines upon the termination of the action or proceeding. The amount of security may, from time to time, be increased or decreased in the discretion of the court upon showing that the security provided has or is likely to become inadequate or excessive. The security may be denied or limited by the court if the court finds after an evidentiary hearing that undue hardship on plaintiffs and serious injustice would result.