Author Professor Ashli Johnson, from Mississippi State University, said: "By studying the microbial community in the panda's gastrointestinal tract, we gain a better understanding of panda nutrition, which could help improve the health and reproduction of the endangered species."

Researchers studied the eating habits of two giant pandas at Memphis Zoo, Le Le a male and Ya Ya a female.

Analysing data which went back to 2003, the team studied how much time both pandas spent feeding on bamboo stalks and leaves.

Pandas mainly eat bambooCredit:
Chung Sung-Jun/Getty

Their findings revealed that pandas spent less than one per cent of their feeding time eating leaves during winter and spring.

However, by August, when mucoids are more prevalent, this was increased to 60 percent.

Every summer wild and captive pandas alike switch from eating the woody stalks of bamboo to leaves.

During this time, which coincides with when female pandas become pregnant, their digestion appears to go awry.

During the months of July and August, pandas pass more mucoids, cease eating, become lethargic and show signs of discomfort and pain.

After studying the bowel movement patterns of the pandas and comparing the months when their eating habits changed, they found pandas passed fewer mucoids during the winter months.

However, in the summer months, the number of mucoids significantly increase.

After studying both healthy stool samples and those affected by mucoids, they found the bacterial diversity levels were low in comparison to other herbivores.

Having a balanced gut is importantCandace Williams

They also found Actinobacteria in the mucoids, which is associated with dysfunction digestion.

Interestingly, the diversity dropped even lower right before mucoids, but then spiked in the mucoids themselves, which contained a different population of microbes than regular poop.

In particular, they were made up of bacteria typically found in the gut lining.

Explaining the findings Professor Garret Suen, from the University of Wisconsin-Madison, US, said: "What we think might be happening is that their diet is causing a strong internal reaction, leading to an inflammatory response.

"Pandas are basically shedding their gastrointestinal lining to allow for the replacement of those microbes. It's kind of like resetting the microbiome."