Fixed #21639 -- Implemented RenderContext.__getitem__

It's now consistent with RenderContext.get.
Small flake8 fixes -- number of blank lines between top level definitions