https://tutorial.eyehunts.com/python/python-nonlocal-keyword-statement-example-code/
Python nonlocal keyword (statement) | Example code