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