Trying to get through a stretch in prison is a test of a person's psyche. Trapped in a small cell for most of your day while surrounded by a bunch of unsavory characters, you'll do almost anything to maintain your sanity while waiting for your release.

Tasked with trying to get through the last nine years of his life behind bars, O.J. Simpson made a very simple choice one day—he decided to eat a cookie. Unfortunately for Simpson, that cookie almost cost him his chance at early parole.

The story comes courtesy of USA Todayas Simpson awaits a parole hearing on Thursday that could see him released from prison as soon as this fall. Jeffrey Felix, a former corrections officer at the Las Vegas prison Simpson has been held at for nearly a decade now, wrote a book claiming Simpson's desire to eat cookies nearly put his prison behavioral record in doubt, and USA Today just shared the story about the controversial cookie.

o4NTA5YTE63hfe1Nf6JIM7sM2BlN9uRo

As the story goes, a fellow inmate who worked in the prison kitchen stole an undisclosed number of cookies while on duty before delivering them to Simpson and other inmates in the jail. While most inmates reportedly ate their cookies in private within their cells, Simpson wolfed his down in view of a corrections officer, who threatened to write him up for possession of contraband.

The consequences could have been severe for Simpson. His original sentence for armed robbery and assault with a weapon was for a maximum of 33 years, and any slip-ups could have pushed back his chance at an early release. In need of a guardian angel, Felix said he intervened on Simpson's behalf when he returned to work the next day. He convinced the guard who saw Simpson eat the cookie to throw out the charge she wrote up by telling her she would be plagued by a terrible nickname for years to come if she followed through with it.

"I talked to the lady who wrote him up and she said, 'I’m not changing my mind. He brought contraband on my tier,'" Felix said, adding that he told the woman she would forever be known as the "Cookie Monster" and that the write-up would undermine her reputation in the prison.

Now Simpson is expected to be paroled and could be released as soon as Oct. 1 — thanks in part, Felix said, to how the story of the illicit cookie and how the female correctional officer handled the potential write-up.

"So she tore it up," Felix said.

I know limiting a prisoner's access to luxuries is sort of the whole point of prison, but treating a cookie as "contraband" is just a bit over the top. There's an almost 100 percent certainty a prisoner's reform has nothing to do with cookie consumption, and even if the focus is on the cookie in question being a stolen good, it doesn't appear Simpson was the thief in question this time around.

Now that Simpson has avoided Cookiegate, he'll get to plead his case (with millions of people watching) to the Nevada Board of Parole on Thursday with a clean record behind bars. He's eligible for release as early as October 1 of this year.