file1.py:
def test_globals():
globals()['t']=5
in python3 repl:
>>> from file1 import *
>>> test_globals()
>>> t
Traceback ....
NameError: name 't' is not defined
>>> def test_globals2(): #local context
globals()['t'] = 5
>>> test_globals2()
>>> t
5
How to fix test_globals function to actually modify globals()?