code: def test_combined_dataset():
      dataset1 = SimpleDataset(0, 10)
      dataset2 = SimpleDataset(10, 20)
      dataset = CombinedStreamingDataset(
          datasets=[dataset1, dataset2], weights=[1.0, 0.0], seed=12345
      )
  
      res = list(dataset)
      assert res == list(range(0, 10))
  
      dataset1 = SimpleDataset(0, 10)
      dataset2 = SimpleDataset(10, 20)
      dataset = CombinedStreamingDataset(
          datasets=[dataset1, dataset2], weights=[0.0, 1.0], seed=12345
      )
  
      res = list(dataset)
      assert res == list(range(10, 20))
  
      dataset1 = SimpleDataset(0, 10)
      dataset2 = SimpleDataset(10, 20)
      dataset = CombinedStreamingDataset(
          datasets=[dataset1, dataset2], weights=[0.5, 0.5], seed=12345
      )
  
      res = list(dataset)
      assert 9 in res or 19 in res
      if len(res) > 10:
          assert 0 in res
          assert 10 in res
  
file_path: pytorch-lightning/tests/tests_data/streaming/test_combined.py
imports: import pytest
  from lightning.data.streaming.combined import CombinedStreamingDataset
  from torch.utils.data import IterableDataset
label_desc: Use image node_id 4 for calling a global function with example usage: test_combined_dataset() without return types