@contextlib.contextmanager
    def mutated_migration_context(self):
        current_numa_topo = self.numa_topology
        self.apply_migration_context()
        try:
            yield
        finally:
            self.numa_topology = current_numa_topo
Context manager to temporarily apply the migration context.
dataset/ETHPy150Open BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/objects/instance.py/Instance.mutated_migration_context