def METHOD_NAME(self, candidateState):
    """
    Method that gets the next state, given the proposed transition to candidateState.
    If candidateState is not on the state map <self.states>, it is rejected. If it is
    not the case, we have two options: if <self.state> is None, then the next state
    will be <candidateState>. Otherwise, the current state is using its own
    transition rule to decide.
    examples:
      >>> sm0.getNextState(None)
          S_OK(None)
      >>> sm0.getNextState('NextState')
          S_OK('NextState')
    :param str candidateState: name of the next state
    :return: S_OK(nextState) || S_ERROR
    """
    if candidateState not in self.states:
        return S_ERROR(f"getNextState: {candidateState!r} is not a valid state")
    # FIXME: do we need this anymore ?
    if self.state is None:
        return S_OK(candidateState)
    return S_OK(self.states[self.state].transitionRule(candidateState))