def __enter__(self):
        module_name = self.target.__module__
        self.module = sys.modules[module_name]
        old_module_dict = self.module.__dict__.copy()
        module_keys = set(self.module.__dict__.keys())

        dunders = set([k for k in module_keys
                        if k.startswith('__') and k.endswith('__')])
        replaced_keys = (module_keys - self.names_under_test - dunders)
        for key in replaced_keys:
            self.module.__dict__[key] = Mock()
        self.module.__dict__['__mock_isolated_dict__'] = old_module_dict
dataset/ETHPy150Open sibson/vncdotool/tests/unit/mock.py/_isolate.__enter__/swapped operands of `-`