OK, in my story with a human colony ship headed to a new planet, I'm thinking of making the life on that planet originate from a comet carrying life with a shared ancestry to earth life. Which means that they'll be a bit less alien than they otherwise could have been. They will share a lot of our amino acids, so people could eat them and actually gain nutrients. However, I want a problem that makes the food dangerous to eat for all but a minority of the population. Since I'm immune to codeine, the idea I had was to have everything have high concentrations of codeine, so most people can only eat local life in moderation or risk overdose. So my question is, how might an alien species (plantlike or animallike) use codeine in their biochemistry? What purpose would it serve, and what would be the likely concentration?