def _write(self, format, *args):
        """
        Safely write to the reporter's stream.

        @param format: A format string to write.
        @param *args: The arguments for the format string.
        """
        s = str(format)
        assert isinstance(s, type(''))
        if args:
            self._stream.write(s % args)
        else:
            self._stream.write(s)
        untilConcludes(self._stream.flush)

        Safely write to the reporter's stream.

        @param format: A format string to write.
        @param *args: The arguments for the format string.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/trial/reporter.py