It shall be unlawful for any state or county officer who is required by law to give official bonds to sign any bond or become surety for any other person or persons during the term for which he is required to give official bonds for himself.