Code of Civil Procedure § 741
CHAPTER 3. Actions for the Recovery of Real Property, and Other Provisions Relating to Actions Concerning Real Property
(a) As used in this section, “good faith improver” has the meaning given that term by Section 871.1.
(b) When damages are claimed for withholding the property recovered, and improvements have been made on the property by a defendant or his predecessor in interest as a good faith improver, the amount by which such improvements enhance the value of the land must be allowed as a setoff against such damages.