The governing board of any high school district lying wholly or partly within a county maintaining a county free library may enter into a contract or agreement with the board of supervisors of the county by which the high school district may secure the advantages of the county free library upon such terms and conditions as are fixed in the contract or agreement.