2. Notwithstanding any inconsistent judicial rule, a contingent fee in a medical, dental or podiatric malpractice action shall not exceed the amount of compensation provided for in the following schedule:
30 percent of the first $250,000 of the sum recovered;
25 percent of the next $250,000 of the sum recovered;
20 percent of the next $500,000 of the sum recovered;
15 percent of the next $250,000 of the sum recovered;
10 percent of any amount over $1,250,000 of the sum recovered.