<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _activate_logger(cls, logger_name, simple_name, detail_level, handler, connection, propagate):
 """ Configure the specified logger, and activate logging and set detail level for connections. The specified logger is always a single pywbem logger; the simple logger name 'all' has already been resolved by the caller into multiple calls to this method. The 'handler' parameter controls logger configuration: * If None, nothing is done. * If a Handler object, the specified logger gets its handlers replaced with the new handler, and logging level DEBUG is set, and the `propagate` attribute of the logger is set according to the `propagate` parameter. The 'connection' paraneter controls activation and setting of the detail level: * If None, nothing is done. * If bool=True, log activation and log detail information is stored for use by future connections in class variables of WBEMConnection. * If bool=False, log activation and log detail information is reset. * If a WBEMConnection object, logging is activated and detail level is set immediately for that connection. """


        if handler is not None:
            assert isinstance(handler, logging.Handler)

            # Replace existing handlers of the specified logger (e.g. from
            # previous calls) by the specified handler

            logger = logging.getLogger(logger_name)
            for hdlr in logger.handlers:
                logger.removeHandler(hdlr)
            logger.addHandler(handler)

            logger.setLevel(logging.DEBUG)
            logger.propagate = propagate

        if connection is not None:
            if isinstance(connection, bool):
                if connection:
                    # Store the activation and detail level information for
                    # future connections. This information is used in the init
                    # method of WBEMConnection to activate logging at that
                    # point.
                    cls._activate_logging = True
                    cls._log_detail_levels[simple_name] = detail_level
                else:
                    cls._reset_logging_config()
            else:
                assert isinstance(connection, WBEMConnection)

                # Activate logging for this existing connection by ensuring
                # the connection has a log recorder

                recorder_found = False
                # pylint: disable=protected-access
                for recorder in connection._operation_recorders:
                    if isinstance(recorder, LogOperationRecorder):
                        recorder_found = True
                        break

                if not recorder_found:
                    recorder = LogOperationRecorder(conn_id=connection.conn_id)

                # Add the log detail level for this logger to the log recorder
                # of this connection

                detail_levels = recorder.detail_levels.copy()
                detail_levels[simple_name] = detail_level
                recorder.set_detail_level(detail_levels)

                if not recorder_found:
                    # This call must be made after the detail levels of the
                    # recorder have been set, because that data is used
                    # for recording the WBEM connection information.
                    connection.add_operation_recorder(recorder)