code: def test_fabric_dataloader_iterator():
      """Test that the iteration over a FabricDataLoader wraps the iterator of the underlying dataloader (no automatic
      device placement)."""
      dataloader = DataLoader(range(5), batch_size=2)
      fabric_dataloader = _FabricDataLoader(dataloader)
      assert len(fabric_dataloader) == len(dataloader) == 3
  
      iterator = iter(dataloader)
      fabric_iterator = iter(fabric_dataloader)
  
      assert torch.equal(next(iterator), next(fabric_iterator))
      assert torch.equal(next(iterator), next(fabric_iterator))
      assert torch.equal(next(iterator), next(fabric_iterator))
  
      with pytest.raises(StopIteration):
          next(iterator)
  
      with pytest.raises(StopIteration):
          next(fabric_iterator)
  
imports: from unittest import mock
  from unittest.mock import Mock, call
  import pytest
  import torch
  from lightning.fabric.fabric import Fabric
  from lightning.fabric.plugins import Precision
  from lightning.fabric.utilities.device_dtype_mixin import _DeviceDtypeModuleMixin
  from lightning.fabric.utilities.imports import _TORCH_GREATER_EQUAL_2_1
  from lightning.fabric.wrappers import _FabricDataLoader, _FabricModule, _FabricOptimizer, _unwrap_objects, is_wrapped
  from torch.utils.data import BatchSampler, DistributedSampler
  from torch.utils.data.dataloader import DataLoader
  from tests_fabric.helpers.runif import RunIf
label_desc: Use image node_id 8 for calling a global function with example usage: test_fabric_dataloader_iterator() without return types