SPRINGFIELD, Mass. — Court documents released Tuesday say a former state chemist was high on drugs almost every day for the nearly eight years she worked at an Amherst drug lab.

Investigators found that Sonja Farak tested drug samples and testified in court while under the influence of methamphetamines, ketamine, cocaine, LSD and other drugs between 2005 and 2013.

A spokeswoman for Attorney General Maura Healey said the information gathered about Farak “will no doubt have implications for many cases.”

Many of the shocking details came from Farak’s own grand jury testimony, including that she once smoked crack before a 2012 state police accreditation inspection of the now-closed lab.

Farak pleaded guilty to tampering with evidence, stealing cocaine from the lab and unlawful possession in 2014.

Her attorney couldn’t be reached for comment.