When assigning to a global variable x within a function, automatically insert declaration "global x".