def saveGlobals(test):
                """
                Save C{test.globs} and replace it with a copy so that if
                necessary, the original will be available for the next test
                run.
                """
                test._savedGlobals = getattr(test, '_savedGlobals', test.globs)
                test.globs = test._savedGlobals.copy()

                Save C{test.globs} and replace it with a copy so that if
                necessary, the original will be available for the next test
                run.
                
stackoverflow/venv/lib/python3.6/site-packages/twisted/trial/runner.py