A Baton Rouge woman whose 3-year-old child tested positive for high levels of cocaine after police found the pair in an apartment covered in dog feces and dirty diapers pleaded not guilty Wednesday to second-degree cruelty to a juvenile.

Megan Gaylord, 25, who also tested positive for cocaine and marijuana, faces up to 40 years in prison if convicted as charged. East Baton Rouge Parish prosecutors charged her in late July.

Gaylord, who was arrested in late June, remains in custody. She appeared Wednesday in state District Judge Trudy White’s courtroom with her ankles shackled and wearing an orange prison shirt and green prison pants.

White appointed the local public defender’s office to represent her.

Baton Rouge police were called to Gaylord’s Marilyn Drive apartment to investigate a disturbance call and were shocked by what they found. A police report says the apartment was “covered in dog feces, spoiled food, trash, dirty diapers” and other materials.

The officers could not complete their probe of the home because it was in such poor condition, so they called Children and Family Services to document the conditions inside the apartment, the report states.

Police smelled a strong odor of burnt marijuana while talking with Gaylord and her child.

Both were taken to Our Lady of the Lake Regional Medical Center, where Gaylord tested positive for multiple controlled substances, including cocaine and marijuana, and the child tested positive for cocaine, police said.

The child was taken into state custody.