def _apply_context(self, from_context, to_context):
        for name, value in from_context.items():
            if value is not None:
                to_context[name].copy_traits(value)
            else:
                to_context[name] = None

        if to_context is self.ui._context:
            on_apply = self.ui.view.on_apply
            if on_apply is not None:
                on_apply()
Set globals and environment variables for PKB.
dataset/ETHPy150Open enthought/traitsui/traitsui/qt4/ui_modal.py/_ModalDialog._apply_context--crossover with--dataset/ETHPy150Open GoogleCloudPlatform/PerfKitBenchmarker/perfkitbenchmarker/pkb.py/SetUpPKB