Any person who willfully fails to appear before any court or judicial officer as required by a written notice to appear shall be fined not more than the fine of the principal charge or imprisoned up to the maximum sentence of imprisonment of the principal charge, or both, regardless of the disposition of the charge upon which the person was originally arrested. Nothing in this section shall interfere with or prevent the court from exercising its power to punish for contempt.