def METHOD_NAME(self, event, new_state):
    """
    Add transition to |new_state| on |event|.
    """
    if type(event) is tuple:
        code0, code1 = event
        i = self.split(code0)
        j = self.split(code1)
        map = self.map
        while i < j:
            map[i + 1][new_state] = 1
            i += 2
    else:
        self.get_special(event)[new_state] = 1