def _done(self):
        """
        Fire a L{Deferred} so that users can wait for this to complete.
        """
        self.consumer = None
        d = self.result
        del self.result
        d.callback(None)

        Fire a L{Deferred} so that users can wait for this to complete.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/internet/testing.py