(a)
The State Department of Developmental Services shall pay for the costs, as defined in this section, of judicial proceedings, including commitment, placement, or release, under this article under both of the following conditions:
(1)
The judicial proceedings are in a county where a state hospital or developmental center maintains a treatment program for persons with intellectual disabilities who are a danger to themselves or others.
(2)
The judicial proceedings relate to a person with an intellectual disability who is at the time residing in the state hospital or developmental center located in the county of the
proceedings.
(b)
The appropriate financial officer or other designated official in a county described in subdivision (a) may prepare a statement of all costs incurred by the county in the investigation, preparation for, and conduct of the proceeding, including any costs of the district attorney or county counsel and any public defender or court-appointed counsel representing the person, and including any costs incurred by the county for the guarding or keeping of the person while away from the state hospital and for transportation of the person to and from the hospital. The statement shall be certified by a judge of the superior court and shall be sent to the State Department of Developmental Services. In lieu of sending statements after each proceeding, the statements may be held and submitted quarterly for the preceding three-month period.