A Lesson Before Dying

A Lesson Before Dying - Ernest J. Gaines

I wonder if Gaines was anyhow inspired by a Claude McKay's poem which starts:

"If we must die, let it not be like hogs
Hunted and penned in an inglorious spot"