I think this needs to have the Twisted copyright header, instead, or some clear delineation of the provenance of the code below.  See `master/buildbot/monkeypatches/bug4520.py` for example.