import copy


def dfa2nfa(dfa):
    """Copy DFA to an NFA, so remove determinism restriction."""
    nfa = copy.deepcopy(dfa)
    nfa.transitions._deterministic = False
    nfa.automaton_type = 'Non-Deterministic Finite Automaton'
    return nfa