def _testLogFormat(self, format, expectedObserver):
        """
        Set log file format and check the selected observer.

        @param format: The format of the file.
        @param expectedObserver: The expected observer.
        """
        options = TwistOptions()
        options.opt_log_format(format)

        self.assertIdentical(
            options["fileLogObserverFactory"], expectedObserver
        )
        self.assertEqual(options["logFormat"], format)

        Set log file format and check the selected observer.

        @param format: The format of the file.
        @param expectedObserver: The expected observer.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/application/twist/test/test_options.py