def _set_power_state(self, method, vm_ref, pwr_state="poweredOn"):
        """Sets power state for the VM."""
        if _db_content.get("VirtualMachine", None) is None:
            raise exception.NotFound("No Virtual Machine has been "
                                     "registered yet")
        if _db_content.get("VirtualMachine") not in vm_ref:
            raise exception.NotFound("Virtual Machine with ref %s is not "
                                     "there" % vm_ref)
        vm_mdo = _db_content.get("VirtualMachine").get(vm_ref)
        vm_mdo.set("runtime.powerState", pwr_state)
        task_mdo = create_task(method, "success")
        return task_mdo.obj
dataset/ETHPy150Open BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/tests/unit/virt/vmwareapi/fake.py/FakeVim._set_power_state/swapped operands of `not in`