Imports a DFA from a JSON file.

    :param str input_file: path + filename to json file;
    :return: *(dict)* representing a DFA.

def dfa_json_importer(input_file: str) -> dict:
    """ Imports a DFA from a JSON file.

    :param str input_file: path + filename to json file;
    :return: *(dict)* representing a DFA.
    """
    file = open(input_file)
    json_file = json.load(file)

    transitions = {}  # key [state ∈ states, action ∈ alphabet]
    #                   value [arriving state ∈ states]
    for (origin, action, destination) in json_file['transitions']:
        transitions[origin, action] = destination

    dfa = {
        'alphabet': set(json_file['alphabet']),
        'states': set(json_file['states']),
        'initial_state': json_file['initial_state'],
        'accepting_states': set(json_file['accepting_states']),
        'transitions': transitions
    }
    return dfa