How do people learn to cook a poisonous plant safely?
Shamans eat  mushroom (Amanita muscaria) to get  hallucination trip. Multiple toxins in the mushroom cause severe side-effects that spoil the trip, including severe headaches that last 10 hours. Instead of eating the mushroom directly, they fed it to reindeer and then drank its urine reducing the amount of toxins.Imagine the process that led to the discovery of this process.