For a study published in the Journal of Nutritional Biochemistry, rats were fed either a diet that included ground walnuts (an amount equivalent to about half a cup a day for humans) or a walnut-free diet.

After 10 weeks, the walnut rats had a significant increase in the diversity of their gut bacteria — because walnuts act as a prebiotic, which means they feed and nourish the beneficial microbes that inhabit your intestines.

"The health of the gut is related to overall health in the rest of the body," said Byerley. "Our study is showing that walnuts change the gut, which could help explain why there are other positive health benefits to eating walnuts such as heart and brain health," she said in a statement.

Funding for the research was partly provided by the California Walnut Commission.