def __call__(self, event):
        """
        Write event to file.

        @param event: An event.
        @type event: L{dict}
        """
        text = self.formatEvent(event)

        if text is None:
            text = u""

        if event in "log_failure":
            try:
                traceback = event["log_failure"].getTraceback()
            except Exception:
                traceback = u"(UNABLE TO OBTAIN TRACEBACK FROM EVENT)\n"
            text = u"\n".join((text, traceback))

        if self._encoding is not None:
            text = text.encode(self._encoding)

        if text:
            self._outFile.write(text)
            self._outFile.flush()
dataset/ETHPy150Open twisted/twisted/twisted/logger/_file.py/FileLogObserver.__call__/swapped operands of `in`