Each school district required to conduct a program of education pursuant to RCW
28A.190.030, and the department of social and health services and the department of children, youth, and families shall hereafter negotiate and execute a written contract for each school year or such longer period as may be agreed to which delineates the manner in which their respective duties and authority will be cooperatively performed and exercised, and any disputes and grievances resolved. Any such contract may provide for the performance of duties by a school district in addition to those set forth in RCW
28A.190.030 (1) through (5), including duties imposed upon the department of social and health services and the department of children, youth, and families and their agents pursuant to RCW
28A.190.040: PROVIDED, That funds identified in RCW
28A.190.030(6) and/or funds provided by the department of social and health services and the department of children, youth, and families are available to fully pay the direct and indirect costs of such additional duties and the district is otherwise authorized by law to perform such duties in connection with the maintenance and operation of a school district.