N-methyltransferase with a strict substrate specificity for (R,S)-tetrahydropalmatine or (R,S)-stylopine. (S)-canadine + S-adenosyl-L-methionine = (S)-N-methylcanadine + S-adenosyl-L-homocysteine Homodimer. Up-regulated by elicitor treatment. Belongs to the CFA/CMAS family.