def METHOD_NAME(self):
    if self.raise_on_deactivate:
        raise ValueError("Intentional fail")
    _fake_resource_call_history.append((self, "_do_deactivate()"))
    return replace(
        self,
        status=replace(
            self.status,
            state=ResourceState.DEACTIVATING,
            message="Deallocating fake resource",
        ),
    )