Premiums paid on undertakings and bonds are ordinarily taxable when they were
furnished by reason of express requirement of law, when they were ordered by the court, or when
they were provided to enable the party to secure some right in the action or proceeding.