code: def test_num_stepping_batches_infinite_training():
      """Test that stepping batches is "inf" when `Trainer` is configured for infinite training."""
      trainer = Trainer(max_steps=-1, max_epochs=-1)
      model = BoringModel()
      trainer._data_connector.attach_data(model)
      trainer.strategy.connect(model)
      assert trainer.estimated_stepping_batches == float("inf")
  
imports: import logging
  import os
  from unittest import mock
  import pytest
  import torch
  from lightning.pytorch import Trainer
  from lightning.pytorch.demos.boring_classes import BoringModel, RandomIterableDataset
  from lightning.pytorch.strategies import SingleDeviceXLAStrategy
  from torch.utils.data import DataLoader
  from tests_pytorch.conftest import mock_cuda_count
  from tests_pytorch.helpers.runif import RunIf
label_desc: Use image node_id 4 for calling a global function with example usage: test_num_stepping_batches_infinite_training() without return types