Reports problems when a variable defined through the global
statement is not defined in the module scope.
Example:
def foo():
global bar
print(bar)
foo()
As a fix, you can move the global variable declaration:
global bar
def foo():
print(bar)