“Tully” has been a hit with critics, but the Charlize Theron-starring film about the difficulties of motherhood is receiving criticism for its depiction of postpartum depression.

Writer Diablo Cody is now speaking out in defence of the film, telling The New York Times, “I don’t want anybody to think that I sat down and thought, ‘Oh, I’ll write a gripping and entertaining movie about something that I know nothing about.’ I would never presume to do that.”

Ann Smith, president of Postpartum Support International said that her organization has received complaints about the film since spoilers began to spread in March.

WARNING: Spoilers for “Tully” below.

RELATED: Charlize Theron Gets Help Taking Care Of Her Kids In ‘Tully’ Trailer

In the film, Theron’s character Marlo is so overworked and sleep-deprived that brother suggests hiring a night nanny to help take care of her new baby while she sleeps. Soon after, a nanny named Tully appears, played by Mackenzie Davis.

In a twist, it turns out Tully only exists in Marlo’s mind.

“The mommy world is up in arms,” Smith said. “I can see why there’s a lot of anger out there, and I think they have a right to it.”

Some mothers have pointed out that in the film Marlo appears to be suffering postpartum psychosis, a rare and dangerous mental illness, and that its depiction can be triggering for mothers who have suffered from it or postpartum depression.

RELATED: Charlize Theron Talks Gaining Weight For ‘Tully’, Insists It’s Not ‘Brave’ To Pile On The Pounds For A Role

“I do think I’m transparent about the fact that I have had mental health issues,” Cody said, responding to the concern from mothers. “My heart goes out to anyone who’s dealt with this, honestly. Because it’s so ignored.”

“The movie is actually about [Marlo’s] lack of treatment,” Cody added.

“Sometimes what you’re desperate is for someone to say: ‘Hey, I actually see what’s going on here. This is serious, we need to deal with it and there’s a name for it,’” she continued. “And Marlo doesn’t get that comfort in this film. Because the film is meant to be uncomfortable.”