code: def test_prediction_loop_when_batch_idx_argument_is_not_given(tmpdir):
      class TestModel(BoringModel):
          def __init__(self) -> None:
              super().__init__()
              self.predict_step_called = False
  
          def predict_step(self, batch):
              self.predict_step_called = True
              return self.step(batch)
  
      trainer = Trainer(
          default_root_dir=tmpdir,
          fast_dev_run=1,
          logger=False,
          enable_checkpointing=False,
          enable_progress_bar=False,
      )
      model = TestModel()
  
      trainer.predict(model)
      assert model.predict_step_called
  
file_path: pytorch-lightning/tests/tests_pytorch/loops/test_prediction_loop.py
imports: import itertools
  import pytest
  from lightning.pytorch import LightningModule, Trainer
  from lightning.pytorch.demos.boring_classes import BoringModel, RandomDataset
  from lightning.pytorch.overrides.distributed import _IndexBatchSamplerWrapper
  from torch.utils.data import DataLoader, DistributedSampler, SequentialSampler
label_desc: Use image node_id 7 for calling a global function with example usage: test_prediction_loop_when_batch_idx_argument_is_not_given(tmpdir) and returns: self