code: def test_combined_loader_sequence_iterable_dataset(
      mode, use_multiple_dataloaders
  ):
      """Test `CombinedLoader` of mode 'min_size' given sequence iterables."""
      if use_multiple_dataloaders:
          loaders = [
              torch.utils.data.DataLoader(
                  TestIterableDataset(10), batch_size=2
              ),
              torch.utils.data.DataLoader(
                  TestIterableDataset(20), batch_size=2
              ),
          ]
      else:
          loaders = [
              torch.utils.data.DataLoader(
                  TestIterableDataset(10), batch_size=2
              ),
          ]
      combined_loader = CombinedLoader(loaders, mode)
  
      has_break = False
      for idx, item in enumerate(combined_loader):
          assert isinstance(item, Sequence)
          if not use_multiple_dataloaders and idx == 4:
              has_break = True
              break
  
      if mode == "max_size_cycle":
          assert all(combined_loader._iterator._consumed) == (
              not has_break
          )
      expected = 5
      if use_multiple_dataloaders:
          if mode in ["max_size_cycle", "max_size"]:
              expected = 10
          elif mode == "sequential":
              expected = 15
      assert idx == expected - 1
  
imports: import math
  import pickle
  from typing import Any, NamedTuple, Sequence, get_args
  import pytest
  import torch
  from lightning.pytorch import Trainer
  from lightning.pytorch.demos.boring_classes import BoringModel, RandomDataset
  from lightning.pytorch.utilities.combined_loader import _LITERAL_SUPPORTED_MODES, _SUPPORTED_MODES, CombinedLoader, _MaxSize, _MaxSizeCycle, _MinSize, _Sequential
  from torch import Tensor
  from torch.utils._pytree import tree_flatten
  from torch.utils.data import DataLoader, TensorDataset
  from torch.utils.data.dataset import Dataset, IterableDataset
  from torch.utils.data.distributed import DistributedSampler
  from torch.utils.data.sampler import RandomSampler, SequentialSampler
  from tests_pytorch.helpers.runif import RunIf
label_desc: Use image node_id 8 for calling a global function with example usage: test_combined_loader_sequence_iterable_dataset(mode, use_multiple_dataloaders) without return types