"""
        Set ``logger`` with attrs stored on instance.
        If ``logger`` is root logger, don't change propagate.
        """
        if replace:
            logger.handlers[:] = self.handlers
        else:
            for h in self.handlers:
                if h not in logger.handlers:
                    logger.addHandler(h)
        logger.level = self.level
        if logger is not logging.getLogger():
            logger.propagate = self.propagate
    def move(self, logger: logging.Logger, replace: bool = True) -> None:
        """
        Replace ``logger`` attrs with those from source.
        :param logger: target logger
        :param replace: if True, remove all handlers from target first; otherwise add if not present.
        """
        self.apply(logger, replace=replace)
        self.source_logger.propagate = True
        self.source_logger.handlers[:] = []
    def reset(self) -> None:
        self.apply(self.source_logger)
    def __enter__(self) -> LoggerMutationHelper:
        return self
    def __exit__(self, exc_type, exc_val, exc_tb) -> None:
        self.reset()