def METHOD_NAME(self, state):
    state.decode_attempt(self)
    # Check that at least one word has been dictated, otherwise fail.
    if state.rule() != self.imported_name:
        state.decode_failure(self)
        return
    # Determine how many words have been dictated.
    count = 1
    while state.rule(count) == self.imported_name:
        count += 1
    # Yield possible states where the number of dictated words
    # gobbled is decreased by 1 between yields.
    for i in range(count, 0, -1):
        state.next(i)
        state.decode_success(self)
        yield state
        state.decode_retry(self)
        state.decode_rollback(self)
    # None of the possible states were accepted, failure.
    state.decode_failure(self)
    return