(a)
When the district attorney incurs expenses pursuant to this chapter, including expenses incurred in a sister state, payment of the expenses may be advanced by the county subject to reimbursement by the state, and shall be audited by the Controller and paid by the State Treasury according to law.
(b)
The court in which the custody proceeding is pending or which has continuing jurisdiction shall, if appropriate, allocate liability for the reimbursement of actual expenses incurred by the district attorney to either or both parties to the proceedings, and that allocation shall constitute a judgment for the state for the funds advanced pursuant to this section. The county shall take reasonable action to enforce that liability and shall transmit all recovered funds to the state.