While the function could be implemented as one 70-line function, it happens to be implemented as a 4-line wrapper for a completely undocumented (Untokenizer class with 4 methods. (It is unmentioned in the doc and there are currently no docstrings.)
I view the class as a private implementation detail and would like to treat it as such, and perhaps even rename it _Untokenizer to make that clear.