def _finalize(self):
<EOL>for logger_name, level in self._initial_log_levels.items():<EOL><INDENT>logger = logging.getLogger(logger_name)<EOL>logger.setLevel(level)<EOL><DEDENT>
Finalizes the fixture.

        This restores the log levels changed by :meth:`set_level`.