All weed district directors, all weed inspectors, and all official agents of all weed districts, in the performance of their official duties, have the right to enter and go upon any of the lands within their weed district at any reasonable time for any reason necessary to effectuate the purposes of the weed district. Any person who prevents or threatens to prevent any lawful agent of the weed district, after said agent identifies himself or herself and the purpose for which he or she is going upon the land, from entering or going upon the land within said weed district at a reasonable time and for a lawful purpose of the weed district, is guilty of a misdemeanor.