Involved in the biosynthesis of pyridine alkaloid natural products, leading mainly to the production of anabasine, anatabine, nicotine and nornicotine, effective deterrents against herbivores with antiparasitic and pesticide properties (neurotoxins); nornicotine serves as the precursor in the synthesis of the carcinogen compound N'-nitrosonornicotine (NNN) (PubMed:21343426). Catalyzes a late oxidation step subsequent to the pyridine ring condensation reaction in the biosynthesis of alkaloids (PubMed:21343426). Alkaloid biosynthesis; nicotine biosynthesis. Mostly expressed in roots. By jasmonic acid (MeJA). Strongly reduced nicotine biosynthesis but accumulation of dihydromethanicotine (PubMed:21343426). Inhibition of jasmonate-elicited formation of anatabine and other pyridine alkaloids (PubMed:21343426). Belongs to the oxygen-dependent FAD-linked oxidoreductase family.