In the movie "Late Night," which opened in limited release Friday, Mindy Kaling plays Molly Patel, a woman plucked from obscurity to help revitalize a long-running but creatively stagnant late-night show.
As the only woman or person of color on the writing staff, she is not exactly welcomed with open arms: On her first day on the job, she resorts to sitting on an overturned trash can because there are no available chairs, and her male colleagues keep barging in on her in the ladies' room, which in the past was always empty.
For many women in late-night television, this depiction of a male-dominated workplace rings true, with one glaring exception: The show Molly works for is hosted by, of all things, a woman. Played by Emma Thompson, Katherine Newbury has been around late night so long she's had the chance to grow out of touch -- a character with about as much basis in reality as a fire-breathing dragon.
Written by Kaling, who was for a time the sole woman and person of color on the writing staff at "The Office," "Late Night" arrives at a moment of contradiction. While there are now more women writing for late night shows than ever before, female hosts, like female presidents, largely remain a figment of the Hollywood imagination. A wave of recent cancellations of female-fronted shows leaves "Full Frontal With Samantha Bee" as the only show currently on the air hosted by a woman. (At least until "A Little Late With Lilly Singh" debuts on NBC in September.)
Bee may have less competition, but she doesn't see that as a good thing. "It doesn't excite me being the only woman late-night host anywhere," she said in an interview.
More encouraging are the gains made by female comedy writers. A decade ago, a tally of women writing for late night shows read like binary code: zeros and ones across the board.
The days of such egregious exclusion appear to be over -- every show currently on a broadcast, cable or streaming network has at least two credited writers who are women -- but there is progress yet to be made: Not a single show has a writers room that is 50% (or more) female.
Progress has not been easy, according to women in late-night TV. One of the less plausible aspects in "Late Night" is the ease with which Kaling's character, who works at a Pennsylvania chemical plant, scores a job as a writer, despite having zero connections or experience in the industry. It's the kind of flourish the phrase "only in the movies" was invented for.
For aspiring comedy writers, the process can be as brutally competitive as getting into the Ivy League -- and just as reliant on powerful connections.
"I feel like most of Hollywood is governed by whose lacrosse team you were rivals with," says Bee, who was for several years the lone female correspondent at "The Daily Show."