https://llego.dev/posts/accessing-global-variables-within-functions-python/