Nothing in this chapter shall preclude the State Departments of Developmental Services and State Hospitals from contracting with a local public education agency, a nonpublic, nonsectarian school, or another agency to provide special education and related services on the state hospital grounds for those pupils whose individualized education programs do not indicate that such education and services should be provided in a program other than on state hospital grounds. These contracts shall not involve funds appropriated for purposes of community-based special education programs provided for state hospital pupils pursuant to this chapter.