code: def test_num_stepping_batches_raises_info_with_no_dataloaders_loaded(
      caplog,
  ):
      """Test that an info message is generated when dataloaders are loaded explicitly if they are not already
      configured."""
      trainer = Trainer(max_epochs=1)
      model = BoringModel()
      trainer._data_connector.attach_data(model)
      trainer.strategy.connect(model)
  
      # artificially setup the data
      trainer.fit_loop.setup_data()
  
      with caplog.at_level(logging.INFO):
          assert trainer.estimated_stepping_batches == 64
  
      message = "to estimate number of stepping batches"
      assert message not in caplog.text
  
      trainer = Trainer(max_epochs=1)
      model = BoringModel()
      trainer._data_connector.attach_data(model)
      trainer.strategy.connect(model)
  
      with caplog.at_level(logging.INFO):
          assert trainer.estimated_stepping_batches == 64
  
      assert message in caplog.text
  
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 2 for calling a global function with example usage: test_num_stepping_batches_raises_info_with_no_dataloaders_loaded(caplog) without return types