Perhaps you've heard this one before: If you eat poppy seeds shortly before a drug test, you may end up with a false positive for the opioid morphine. You probably assumed it was a myth.

It's not — as one new mom recently found out to her horror. Elizabeth Eden from Baltimore County, Maryland, tested positive for opioids while she was in labor after she had eaten a poppy seed bagel earlier in the day, Newsweek reports. Her doctor reported her to the state before telling her about the positive test or giving her a chance to explain. For five days, she wasn't allowed to leave the hospital, even though she and the baby are fine. She even had a caseworker assigned to her.

In the end, her case was closed because tests showed she hadn't used any opioids, but it was a "traumatic" experience, she said.

What to poppy seeds and morphine have in common?

poppy flowers, poppy seeds Poppy seeds can be a culinary treat or a job applicant's nightmare. (Photo: almaje/Shutterstock)

There are various types of poppies, and only some of them produce narcotics. The flower known as "opium poppy," Papaver somniferous, is used to produce morphine, heroin and other painkillers, says Slate. The same variety of poppy also produces the seeds that are used for culinary purposes, like the poppy seed bagel Eden ate shortly before labor.

It's the milk-like substance that's taken out of the seed pod that produces the illegal drug, but sometimes the dried and cleaned seeds that are also inside the seed pod can be contaminated with opium milk, according to the New Zealand Drug Foundation. While the residual opium milk on poppy seeds won't make someone who eats a bagel or slice of lemon cake feel the effects of morphine, it can mess with a drug test.

The residual opium milk in poppy seeds usually doesn't last longer in your body than 12 to 24 hours, but in some cases it can stay around for two or three days. If you're due to give birth anytime soon or will be taking a drug test for employment, skip anything with poppy seeds — and you'll skip the hassle of dealing with a false positive.

Robin Shreeves ( @rshreeves ) focuses on food from a family perspective from her home base in New Jersey.

Don't eat poppy seeds before taking a drug test
You thought that line about eating poppy seeds and failing a drug test was a myth. It's not.