def METHOD_NAME(self, state, event, new_state, maxint=maxint):
    if type(event) is tuple:
        code0, code1 = event
        if code0 == -maxint:
            state['else'] = new_state
        elif code1 != maxint:
            while code0 < code1:
                state[unichr(code0)] = new_state
                code0 += 1
    else:
        state[event] = new_state