(b) In any such action the corporation may recover, in addition to such sum or sums, legal interest thereon and the amount of any penalty imposed by such corporation's by-laws for failure to pay such assessments; but no such corporation shall provide in its by-laws for such a penalty in excess of fifty percent of such an assessment.