Notwithstanding any other provision of law, any treasurer, or other authorized county officer, who invests, deposits or otherwise handles funds for public agencies for the purpose of earning interest or other income on such funds as permitted by law, may deduct from such interest or income, before distribution thereof, the actual administrative cost of such investing, depositing or handling of funds and of distribution of such interest or income. Such cost reimbursement shall be paid into the county general fund.