“Swan Song” comes off like the saddest-ever episode of “Black Mirror.” If you had a terminal disease, would you allow a scientist to create a duplicate which could take your place in the world and live the life you’ll never have?

Mahershala Ali plays Cameron, a terminally ill man who is offered that opportunity by Dr. Jo Scott (Glenn Close), who has developed the technology to make Replacement Cameron, complete with all his thoughts and memories, to carry on without anyone — including his wife and son — knowing.

Most of “Swan Song” takes place at the facility where Dr. Scott runs her operation, the same kind of hidden-away, ultra-modern-looking wood-and-glass installation that “Ex Machina” took place in. Apparently, that’s the construction motif for scientists creating artificially intelligent beings. The only people there are Dr. Scott, two assistants, and another patient, Kate (Awkwafina), who has taken up residence while her dopplegänger lives out her life.

The overriding problem of “Swan Song” is that it moves at a snail’s pace. At first, Cameron can’t make up his mind about the procedure and, when he does, he’s riddled with doubt over never seeing his wife and son again. As good an actor as Ali is, the simple fact is that watching sad people being sad isn’t entertaining. Even when he plays Replacement Cameron, he’s restricted by writer/director Benjamin Cleary’s incredibly boring and surprisingly unemotional script.

Awkwafina’s presence is wasted, too, as Kate doesn’t offer much to the proceedings other than sorrow. She engages in exactly zero interesting conversations with Cameron, not even a discussion of why they each made their decisions and how best to occupy their remaining time. Why not at least give these two terminally ill humans a ping pong table or a Sony PlayStation?

As for Close, I’d be surprised if she didn’t shoot all of her scenes in a single day after being told by Cleary to maintain a monotonal delivery and keep her brow furrowed at all times.

There’s nothing to be learned from “Swan Song” other than how to waste two hours in a sci-fi morass. I give it a 2.5 out of 10. Opens in theaters and streaming on Apple TV+ tomorrow.