Python globals() built-in function
Python globals() built-in function
From the Python 3 documentation Return the dictionary implementing the current module namespace. For code within functions, this is set when the function is defined and remains the same regardless of where the function is called.