def METHOD_NAME(self, data):
    """
    return next state. May override in a subclass to change
    behavior or pass a handler method to ctor
    """
    if self.handler:
        state = self.handler(data)
        if state is None:
            return self.next_state
        return state
    return self.next_state