def rename_afw_states(afw: dict, suffix: str):
    """ Side effect on input! Renames all the states of the AFW
    adding a **suffix**.

    It is an utility function used during testing to avoid automata to have
    states with names in common.

    Avoid suffix that can lead to special name like "as", "and",...

    :param dict afw: input AFW.
    :param str suffix: string to be added at beginning of each state name.
    """
    conversion_dict = {}
    new_states = set()
    new_accepting = set()
    for state in afw['states']:
        conversion_dict[state] = '' + suffix + state
        new_states.add('' + suffix + state)
        if state in afw['accepting_states']:
            new_accepting.add('' + suffix + state)

    afw['states'] = new_states
    afw['initial_state'] = '' + suffix + afw['initial_state']
    afw['accepting_states'] = new_accepting

    new_transitions = {}
    for transition in afw['transitions']:
        new_transition = __replace_all(conversion_dict, transition[0])
        new_transitions[new_transition, transition[1]] = \
            __replace_all(conversion_dict, afw['transitions'][transition])
    afw['transitions'] = new_transitions