In this line and the next two, you can pull out config['CSRFTokenConfig'] into a variable and use that instead. Best not to repeat lookups when you can avoid it.