code: def test_logger_reset_correctly(tmp_path, tuner_method):
      """Test that the tuners do not alter the logger reference."""
  
      class CustomModel(BoringModel):
          def __init__(self, lr=0.1, batch_size=1):
              super().__init__()
              self.save_hyperparameters()
  
      model = CustomModel()
      trainer = Trainer(default_root_dir=tmp_path, max_epochs=1)
      tuner = Tuner(trainer)
  
      logger1 = trainer.logger
      getattr(tuner, tuner_method)(model)
      logger2 = trainer.logger
      logger3 = model.logger
  
      assert logger1 == logger2, "Finder altered the logger of trainer"
      assert logger2 == logger3, "Finder altered the logger of model"
  
imports: import inspect
  import os
  import pickle
  from unittest import mock
  from unittest.mock import ANY, Mock
  import pytest
  import torch
  from lightning.pytorch import Callback, Trainer
  from lightning.pytorch.demos.boring_classes import BoringModel
  from lightning.pytorch.loggers import CometLogger, CSVLogger, MLFlowLogger, NeptuneLogger, TensorBoardLogger, WandbLogger
  from lightning.pytorch.loggers.logger import DummyExperiment, Logger
  from lightning.pytorch.loggers.tensorboard import _TENSORBOARD_AVAILABLE
  from lightning.pytorch.tuner.tuning import Tuner
  from tests_pytorch.helpers.runif import RunIf
  from tests_pytorch.loggers.test_comet import _patch_comet_atexit
  from tests_pytorch.loggers.test_mlflow import mock_mlflow_run_creation
label_desc: Use image node_id 6 for calling a global function with example usage: test_logger_reset_correctly(tmp_path, tuner_method) without return types