forgym.py
can be found in the context of its repo here. I made this Gist, so that I can include it with my OpenAI Gym upload.
For much more interesting information than this short script and the reward graph, have a look at (Non-)Interruptibility of Sarsa(λ) and Q-Learning.