code: def test_done_dataloader_iter(iterable):
      loader = CombinedLoader(iterable)
      fetcher = _DataLoaderIterDataFetcher()
      fetcher.setup(loader)
      iter(fetcher)
  
      assert not fetcher.done
      dataloader_iter = next(fetcher)
      for i in range(
          5
      ):  # doesn't matter how many times you next this, the dataloader_iter needs to be consumed
          assert next(fetcher) is next(fetcher)
  
      assert not dataloader_iter.done
      assert dataloader_iter.data_fetcher is fetcher
  
      assert not dataloader_iter.done
      assert next(dataloader_iter)[0] == 1
      assert not dataloader_iter.done
      assert next(dataloader_iter)[0] == 2
      assert not dataloader_iter.done
  
      assert next(dataloader_iter)[0] == 3
      if isinstance(iterable, list):
          # with sized data, we know we're done
          assert dataloader_iter.done
      else:
          # with unsized data, the StopIteration needs to be raised
          assert not dataloader_iter.done
  
      with pytest.raises(StopIteration):
          next(dataloader_iter)
      assert dataloader_iter.done
  
imports: from collections import Counter
  from typing import Any, Iterator
  import pytest
  import torch
  from lightning.pytorch import LightningDataModule, Trainer
  from lightning.pytorch.demos.boring_classes import BoringModel, RandomDataset
  from lightning.pytorch.loops.fetchers import _DataLoaderIterDataFetcher, _PrefetchDataFetcher
  from lightning.pytorch.profilers import SimpleProfiler
  from lightning.pytorch.utilities.combined_loader import CombinedLoader
  from lightning.pytorch.utilities.exceptions import MisconfigurationException
  from lightning.pytorch.utilities.types import STEP_OUTPUT
  from torch import Tensor
  from torch.utils.data import DataLoader, Dataset, IterableDataset
  from tests_pytorch.helpers.runif import RunIf
label_desc: Use image node_id 12 for calling a global function with example usage: test_done_dataloader_iter(iterable) without return types