code: def test_min_max_steps_epochs(
      tmpdir, min_epochs, max_epochs, min_steps, max_steps
  ):
      """Tests that max_steps can be used without max_epochs."""
      model = BoringModel()
  
      trainer = Trainer(
          default_root_dir=tmpdir,
          min_epochs=min_epochs,
          max_epochs=max_epochs,
          min_steps=min_steps,
          max_steps=max_steps,
          enable_model_summary=False,
      )
      trainer.fit(model)
  
      # check training stopped at max_epochs or max_steps
      if trainer.max_steps and not trainer.max_epochs:
          assert trainer.global_step == trainer.max_steps
  
imports: import pytest
  from lightning.fabric.utilities.warnings import PossibleUserWarning
  from lightning.pytorch import Trainer
  from lightning.pytorch.demos.boring_classes import BoringModel
  from lightning_utilities.test.warning import no_warning_call
label_desc: Use image node_id 1 for calling a global function with example usage: test_min_max_steps_epochs(tmpdir, min_epochs, max_epochs, min_steps, max_steps) without return types