code: def test_trainer_reset_correctly(tmpdir):
      """Check that all trainer parameters are reset correctly after lr_find()"""
      model = BoringModel()
      model.lr = 0.1
  
      # logger file to get meta
      trainer = Trainer(default_root_dir=tmpdir, max_epochs=1)
      tuner = Tuner(trainer)
  
      changed_attributes = [
          "accumulate_grad_batches",
          "callbacks",
          "checkpoint_callback",
          "current_epoch",
          "loggers",
          "global_step",
          "max_steps",
          "fit_loop.max_steps",
          "strategy.setup_optimizers",
          "should_stop",
      ]
      expected = {
          ca: getattr_recursive(trainer, ca)
          for ca in changed_attributes
      }
  
      with no_warning_call(
          UserWarning, match="Please add the following callbacks"
      ):
          tuner.lr_find(model, num_training=5)
  
      actual = {
          ca: getattr_recursive(trainer, ca)
          for ca in changed_attributes
      }
      assert actual == expected
      assert model.trainer == trainer
  
imports: import logging
  import math
  import os
  from copy import deepcopy
  from typing import Any
  from unittest import mock
  import pytest
  import torch
  from lightning.pytorch import Trainer, seed_everything
  from lightning.pytorch.callbacks.lr_finder import LearningRateFinder
  from lightning.pytorch.demos.boring_classes import BoringModel
  from lightning.pytorch.tuner.lr_finder import _LRFinder
  from lightning.pytorch.tuner.tuning import Tuner
  from lightning.pytorch.utilities.exceptions import MisconfigurationException
  from lightning.pytorch.utilities.types import STEP_OUTPUT
  from lightning_utilities.test.warning import no_warning_call
  from tests_pytorch.helpers.datamodules import ClassifDataModule
  from tests_pytorch.helpers.runif import RunIf
  from tests_pytorch.helpers.simple_models import ClassificationModel
  from tests_pytorch.helpers.utils import getattr_recursive
label_desc: Use image node_id 3 for calling a global function with example usage: test_trainer_reset_correctly(tmpdir) without return types