Is cannabis considered an agricultural crop in California?

California defines medical cannabis as an agricultural product.
California Health and Safety Code 11362.777(a) specifies:
“For purposes of this section and Chapter 3.5 (commencing with Section 19300) of Division 8 of the Business and Professions Code, medical cannabis is an agricultural product.”

The identification as an agricultural crop does not extend to other areas of the law. For example, cannabis is not an agricultural crop with respect to local “right to farm” ordinances.