If you asked me to name a movie in which a group of prisoners put on a show, the only thing I’d come with is the “Prisoners Of Love” finale of Mel Brooks’ classic, “The Producers.”

Now I have a different answer. “Sing Sing” is based on the true story of inmates behind the walls and bars of the maximum security facility in upstate New York who are members of RTA, which stands for Rehabilitation Through the Arts.

A dozen of so of them get together to put on plays and musicals the outside world will never see — often for just one performance. These are guys who committed serious crimes (e.g. murder, burglary, dealing drugs) who won’t see that outside world again for a long time, if ever.

But in this rehearsal space, there are no guards. The members of RTA look out for each other. The old-timers help the rookies learn how to project so their voice reaches the last row, how to stand on a mark before saying their lines, and how to memorize those lines in the first place. They stretch, they do acting exercises, they even dance.

“Sing Sing” is not a documentary, but is based on “The Sing Sing Follies,” an Esquire piece John H. Richardson wrote in 2005 after observing the program in person. The movie stars Colman Domingo as Divine G, one of the co-founders of RTA, who leads the steering committee, a group of prisoners who decide who passes auditions, what show they’re going to put on next, and who will play each part. They’re assisted by Brent Buell (Paul Raci), a producer/director/writer who shows up at the prison regularly to volunteer his time writing and directing the rehearsals and productions.

All the other prisoner/performers are played by men who did long stretches in Sing Sing and agreed to return to play themselves. Watching them reveals the value of RTA. While they lived in a dangerous, often violent setting, the program not only gave them a respite, but changed them, too. If that set them up for success outside the prison walls once they were released, so much the better for all of us.

One of them, Clarence “Divine Eye” Maclin, is an absolute scene-stealer who gets to perform Shakespeare’s “To Be Or Not To Be” soliloquy from Hamlet. But the show Buell wrote, “Breakin’ The Mummy’s Code,” is far from Shakespearean. It’s an amalgam of all sorts of movie and theater styles the members of RTA wanted mashed-up, including time travel, westerns, gladiators, and ancient Egyptians.

Director Greg Kwedar, who co-wrote the movie’s screenplay with Clint Bentley, gives each member of RTA a moment to shine, but it’s the performances of Domingo and Maclin that keep “Sing Sing” rooted. And keeps us rooting for their characters.

I give “Sing Sing” an 8.5 out of 10. Opens today in theaters.