def find_all(self, seq):
if not self._suffix_links_set:<EOL><INDENT>self._set_suffix_links()<EOL><DEDENT>current = self.root<EOL>for pos, char in enumerate(seq):<EOL><INDENT>while char not in current and current.has_suffix:<EOL><INDENT>current = current.suffix<EOL><DEDENT>if char in current:<EOL><INDENT>current = current[char]<EOL><DEDENT>else:<EOL><INDENT>assert current is self.root<EOL><DEDENT>if current.has_value:<EOL><INDENT>yield (<NUM_LIT:1> + pos - current.depth, current.depth, current.value)<EOL><DEDENT>dict_suffix = current<EOL>while dict_suffix.has_dict_suffix:<EOL><INDENT>dict_suffix = dict_suffix.dict_suffix<EOL>yield (<NUM_LIT:1> + pos - dict_suffix.depth, dict_suffix.depth, dict_suffix.value)<EOL><DEDENT><DEDENT>
Generator expression.  Yields tuples of `(begin, length, value)`,
where:

- `begin` is an integer identifying the character index where
  the match begins (0-based)
- `length` is an integer indicating the length of the match (1
  or more characters)
- `value` is the value of the matching node in the trie