A prosecutor has told a jury that a prison guard should be convicted of manslaughter for failing to intervene in the brutal beating of an inmate by other guards.