(a) The order shall not be complied with by the sheriff until there has been executed in his or her presence, by one (1) or more sufficient sureties of the plaintiff, a bond to the defendant, to the effect that the plaintiff shall duly prosecute the action and that he or she shall perform the judgment of the court therein by returning the property, if a return thereof shall be adjudged, and by paying any sums of money adjudged against him or her in the action, not exceeding double the value of the property and the costs of the action.
(b) When the action is brought against a sheriff or other officer to recover possession of property taken by him or her under an execution against a person other than the plaintiff, the bond provided for in subsection (a) of this section shall be to the effect that the plaintiff shall duly prosecute the action and that he or she shall perform the judgment of the court therein by returning the property, if a return thereof shall be adjudged, and by paying to the defendant or to the plaintiff in the execution, as may be directed by the court, any sums of money adjudged against the plaintiff in the action, not exceeding double the value of the property and the costs of the action.