Sec. 7. ADVANCE BY COUNTY. The county in which a criminal proceeding is pending, upon request of the district attorney or other prosecutor charged with the duty of prosecution in the proceeding, may advance funds from its treasury to any witness who will be entitled to reimbursement under this article. The amount advanced may not exceed the amount that is reasonably necessary to enable the witness to attend as required or requested. However, the amount advanced may include sums in excess of the reimbursement provided for by this article if the excess is required for compliance with Section 4 of Article 24.28 in securing the attendance of a witness from another state under the Uniform Act. A county that advances funds to a witness under this section is entitled to reimbursement by the state as an assignee of the witness.