The idiom to work with kwargs is `score_size = kwargs.get('score_size', default). Compared to this, you lose the None check, but if input needs to be an int it'd be safer to call `int(...)` and let that fail. The same applies in a few more places later.