docs: def dfa_word_acceptance(dfa: dict, word: list) -> bool:
      """ Checks if a given **word** is accepted by a DFA,
      returning True/false.
  
      The word w is accepted by a DFA if DFA has an accepting run
      on w. Since A is deterministic,
      :math:`w ∈ L(A)` if and only if :math:`ρ(s_0 , w) ∈ F` .
  
      :param dict dfa: input DFA;
      :param list word: list of actions ∈ dfa['alphabet'].
      :return: *(bool)*, True if the word is accepted, False in the
               other case.
      """
      current_state = dfa['initial_state']
      for action in word:
          if (current_state, action) in dfa['transitions']:
              current_state = dfa['transitions'][current_state, action]
          else:
              return False
  
      if current_state in dfa['accepting_states']:
          return True
      else:
          return False