code: def test_auto_scale_batch_size_trainer_arg(tmpdir, scale_arg):
      """Test possible values for 'batch size auto scaling' Trainer argument."""
      before_batch_size = 2
      model = BatchSizeModel(batch_size=before_batch_size)
      trainer = Trainer(
          default_root_dir=tmpdir,
          max_epochs=1,
          accelerator="gpu",
          devices=1,
      )
      tuner = Tuner(trainer)
      tuner.scale_batch_size(model)
      after_batch_size = model.batch_size
      assert (
          before_batch_size != after_batch_size
      ), "Batch size was not altered after running auto scaling of batch size"
  
      assert not any(
          f
          for f in os.listdir(tmpdir)
          if f.startswith(".scale_batch_size_temp_model")
      )
  
imports: import logging
  import os
  from copy import deepcopy
  from unittest.mock import patch
  import pytest
  import torch
  from lightning.pytorch import Trainer
  from lightning.pytorch.callbacks.batch_size_finder import BatchSizeFinder
  from lightning.pytorch.demos.boring_classes import BoringDataModule, BoringModel, RandomDataset
  from lightning.pytorch.tuner.tuning import Tuner
  from lightning.pytorch.utilities.exceptions import MisconfigurationException
  from lightning_utilities.test.warning import no_warning_call
  from torch.utils.data import DataLoader
  from tests_pytorch.helpers.runif import RunIf
label_desc: Use image node_id 3 for calling a global function with example usage: test_auto_scale_batch_size_trainer_arg(tmpdir, scale_arg) without return types