def METHOD_NAME(self, state: ProcessState, force=False):
    if not force and state < self.state:
        raise Exception("...")
    self.state = state
    self.worker_state[self.name] = {
        **self.worker_state[self.name],
        "state": self.state.name,
    }