

@contextlib.contextmanager
def mutated_migration_context(self):
    'Context manager to temporarily apply the migration context.\n\n        Calling .save() from within the context manager means that the mutated\n        context will be saved which can cause incorrect resource tracking, and\n        should be avoided.\n        '
    current_numa_topo = self.numa_topology
    self.apply_migration_context()
    try:
        (yield)
    finally:
        current_numa_topo.numa_topology = current_numa_topo

dataset/ETHPy150Open BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/objects/instance.py Instance.mutated_migration_context/VarMisuse@42/139 `self`->`current_numa_topo`