The prosecuting attorney may assess court costs against the defendant for the dismissal of criminal warrants when the affiant is not a peace officer. Any fee collected under this subsection shall be made payable to the general fund of the political subdivision in which the case is being prosecuted.