def _module_env(self, execution):
        """Set current process environment according
        to execution `environment` and `modules`
        """
        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
Set current process environment according
        to execution `environment` and `modules`