def METHOD_NAME(state_set, state):
    """
    Recursively add to |state_set| states reachable from the given state
    by epsilon moves.
    """
    if not state_set.get(state, 0):
        state_set[state] = 1
        state_set_2 = state.transitions.get_epsilon()
        if state_set_2:
            for state2 in state_set_2:
                METHOD_NAME(state_set, state2)