def cleanup(passthrough):
            """
            Shut down the server port.  Return a Deferred which fires when
            this has completed.
            """
            result = defer.maybeDeferred(serverPort.stopListening)
            result.addCallback(lambda ign: passthrough)
            return result

            Shut down the server port.  Return a Deferred which fires when
            this has completed.
            
stackoverflow/venv/lib/python3.6/site-packages/twisted/test/test_tcp.py