def flush(self):
        "Pump until there is no more input or output."
        while self.pump():
            pass
Pump until there is no more input or output.
stackoverflow/venv/lib/python3.6/site-packages/twisted/test/testutils.py