(a) The perfecting of an appeal shall not stay enforcement of the judgment or order in cases not provided for in Sections 917.1 to 917.8, inclusive, if the trial court, in its discretion, requires an undertaking and the undertaking is not given, in any of the following cases:
(1) Appellant was found to possess money or other property belonging to respondent.
(2) Appellant is required to perform an act for respondent’s benefit pursuant to judgment or order under appeal.
(3) The judgment against appellant is solely for costs awarded to the respondent by the trial court pursuant to Chapter 6 (commencing with Section 1021) of Title 14.
(b) The undertaking shall be in a sum fixed by the court and shall be in an amount sufficient to cover all damages which the respondent may sustain by reason of the stay in the enforcement of the judgment or order.
(c) The undertaking shall be in the sum fixed by the court. The undertaking shall be conditioned upon the performance of the judgment or order appealed from or payment of the sums required by the judgment or order appealed from, if the judgment or order is affirmed or the appeal is withdrawn or dismissed, and it shall provide that if the judgment or order appealed from or any part of it is affirmed, or the appeal is withdrawn or dismissed, the appellant will pay all damages which the respondent may sustain by reason of the stay in the enforcement of the judgment.
(d) For the purpose of this section, “damages” means either of the following:
(1) Reasonable compensation for the loss of use of the money or property.
(2) Payment of the amounts specified in paragraph (3) of subdivision (a).