After arrest and before plea or trial, or after conviction or plea of guilty and before sentence under either Section 270 or 270a, if the defendant shall appear before the court and enter into an undertaking with sufficient sureties to the people of the State of California in such penal sum as the court may fix, to be approved by the court, and conditioned that the defendant will pay to the person having custody of such child or to such spouse, such sum per month as may be fixed by the court in order to thereby provide such minor child or such spouse as the case may be, with necessary food, shelter, clothing, medical attendance, or other remedial care, then the court may suspend proceedings or sentence therein; and such undertaking is valid and binding for two years, or such lesser time which the court shall fix; and upon the failure of defendant to comply with such undertaking, the defendant may be ordered to appear before the court and show cause why further proceedings should not be had in such action or why sentence should not be imposed, whereupon the court may proceed with such action, or pass sentence, or for good cause shown may modify the order and take a new undertaking and further suspend proceedings or sentence for a like period.
Ca. Pen. Code § 270b