code: def _module_env(self, execution):
          
          env = copy.copy(os.environ)
          try:
              for mod in execution.get('modules') or []:
                  Module.load(mod)
              os.environ.update(execution.get('environment') or {})
              yield
          finally:
              os.environ = env
docs: Set current process environment according
          to execution `environment` and `modules`