def METHOD_NAME(self, cur_validators):
    if self.state is NodeState.NOTRUNNING:
        if bool(random.getrandbits(1)):
            start_node(self.machine)
            self.state = NodeState.SYNCING
    elif self.state is NodeState.SYNCING:
        node_status = self.get_status()
        if not node_status['sync_info']['syncing']:
            self.state = NodeState.NONVALIDATING
        else:
            cur_height = node_status['sync_info']['latest_block_height']
            assert cur_height > self.last_synced_height + 10, f'current height {cur_height} did not change much from last synced height: {self.last_synced_height}'
            self.last_synced_height = cur_height
    elif self.state is NodeState.NONVALIDATING:
        if bool(random.getrandbits(1)):
            stop_node(self.machine)
            self.state = NodeState.NOTRUNNING
        else:
            stake = int(list(cur_validators.values())[0])
            self.send_staking_tx(stake)
            self.state = NodeState.STAKED
    elif self.state is NodeState.STAKED:
        if self.signer_key.account_id in cur_validators:
            self.state = NodeState.VALIDATING
    elif self.state is NodeState.VALIDATING:
        assert self.signer_key.account_id in cur_validators, f'invariant failed: {self.signer_key.account_id} not in {cur_validators}'
        if bool(random.getrandbits(1)):
            self.send_unstaking_tx()
            self.state = NodeState.UNSTAKED
    elif self.state is NodeState.UNSTAKED:
        if self.signer_key.account_id not in cur_validators:
            self.state = NodeState.NONVALIDATING
    else:
        assert False, "unexpected state"