It is unlawful for any person to do any of the following:
- (a) Lead, drive, or conduct any animal along the track of a railroad, unless the railroad is built within the limits of a public highway or public place.
- (b) Permit any animal to be placed within the fences of a railroad for grazing or other purposes if he has the right to prevent it.