n12 Except as . . . provided for by statute, the measure and mode of compensation of attorneys and counselors at law is left to the agreement, express or implied, of the parties. . . . Cal. Code Civ. P. @ 1021.