Emma Thompson stars in a scene from the movie "Late Night." The Catholic News Service classification is A-III — adults. The Motion Picture Association of America rating is R — restricted. Under 17 requires accompanying parent or adult guardian. (CNS photo/Amazon Studios)
Emma Thompson stars in a scene from the movie "Late Night." The Catholic News Service classification is A-III — adults. The Motion Picture Association of America rating is R — restricted. Under 17 requires accompanying parent or adult guardian. (CNS photo/Amazon Studios)
NEW YORK (CNS) — The decidedly improbable and scattershot comedic elements of "Late Night" (Amazon) give the film the look of something that had its dents hammered out in the editing room.

It's still an uplifting story, however, scripted by Mindy Kaling, briskly directed by Nasha Ganatra. The film is partly based on Kaling's own experiences as a TV scribe trying to get her voice heard in an all-white, all-male writers' room and eventually expressed by a late-night TV host.

There's a sentimental, heartfelt moral lesson: TV, that most democratic and far-reaching of mediums, is better when a broad range of perspectives and experiences are included as input.

Kaling is Molly, a young woman with no professional comedy experience, although she used to crack up her fellow employees at the chemical plant where she worked in quality control. Through a fortuitous corporate-ownership connection — the same behemoth that runs the plant also controls the network — she applies for a "Late Night" writing job, the fulfillment of her lifelong dream.

This opportunity comes about because the host of "Late Night" is desperately trying to hold onto her program. Katherine Newbury (Emma Thompson) was once the hottest star in her time slot. But, having outlasted both Jay Leno and David Letterman — as well as other competitors in between — after 28 years she's become stale, without realizing that this has occurred.

Katherine favors substantial guests such as presidential historian Doris Kearns Goodwin. But she's told that Jimmy Fallon gets a bigger audience by having guests wash a sheepdog with him. Katherine is also strangely clueless about social media, which she's never used, and has the additional distraction of an ailing husband, Walter (John Lithgow).

Finally, the network head, Caroline (Amy Ryan), tells Katherine she's being canceled, and she has a potty-mouthed comedian, Daniel (Ike Barinholtz) waiting in the wings to replace her.

Rather than cave, Katherine somehow takes it as a challenge, forcing her to reconnect with her writers. Too lazy to learn names, she assigns them numbers. And Molly becomes the single "diversity hire" in a cynical scheme to create a veneer of multiculturalism.

Molly finds herself not so much in a hostile workplace as a clueless one filled through an old-boy network filled with anxious tics and neuroses. Kaling obviously has too much affection for TV to make a lacerating attack on how the product is manufactured.

Molly, in her effervescent manner, produces ways for Katherine to freshen her presentation, express her femininity and reconnect with her audiences, which works well until a sex scandal threatens to derail everyone's career.

The gags are uneven and some viewers might feel that the same material was often handled more deftly on Tina Fey's "30 Rock." But Kaling isn't about to hector anyone, preferring to sprint toward a joyful ending.

The film contains some references to sexual activity, scatological references, and some rough and crude language and profanities. The Catholic News Service classification is A-III — adults. The Motion Picture Association of America rating is R — restricted. Under 17 requires accompanying parent or adult guardian.