@classmethod
def removeState(cls, *states):
    """ Removes a state from the FSA
        This method should be preferred instead of the "setState" method.
        Multiple states can be removed at once
        This methods, however, cannot be used to set the state to S_OFF.
        """
    nextState = cls.getState()
    for state in states:
        nextState &= ~state
    if nextState < cls.S_IDLE:
        nextState |= cls.S_IDLE
    cls.setState(nextState)
