def boundary_words(seq):
in_word = None<EOL>for char in seq:<EOL><INDENT>if char == '<STR_LIT:\x00>' and in_word is not None:<EOL><INDENT>in_word = not in_word<EOL><DEDENT>elif char in WHITESPACE_CHARS:<EOL><INDENT>if in_word is not None and in_word:<EOL><INDENT>yield '<STR_LIT:\x00>'<EOL><DEDENT>in_word = False<EOL><DEDENT>else:<EOL><INDENT>if in_word is not None and not in_word:<EOL><INDENT>yield '<STR_LIT:\x00>'<EOL><DEDENT>in_word = True<EOL><DEDENT>yield char<EOL><DEDENT>
Wraps all word transitions with a boundary token character (\x00).

Arguments:
- `seq`: