Used this hack from https://github.com/psf/black/issues/1288
$ pip install black==19.3b0 && black . && pip install black==19.10b && black .
I then manually reverted changes to a handful of explicit data
structures where the magic trailing comma should be retained
(indicates to black not to squash into one line).
Doing this dramatically improves the changes from trying black
version 21.7b0 (right now just four minor changes).
Under Python 3 need to use next(iterator) rather than
iterator.next(), and this built in function is new in
Python 2.6 (so we couldn't use it until we dropped
support for Python 2.5).
text based on the length of a string. I suspect this may have different
counts because of line break differences between platforms, and may
be causing a test failure on windows.