code: def test_streaming_dataset_distributed_full_shuffle_even(
      drop_last, tmpdir
  ):
      seed_everything(42)
  
      cache = Cache(str(tmpdir), chunk_size=10)
      for i in range(1222):
          cache[i] = i
  
      cache.done()
      cache.merge()
  
      dataset = StreamingDataset(
          input_dir=str(tmpdir), shuffle=True, drop_last=drop_last
      )
      assert dataset.shuffle
      _ = dataset[0]
      assert isinstance(dataset.shuffler, FullShuffle)
  
      for i in range(1222):
          assert dataset[i] == i
  
      dataset.distributed_env = _DistributedEnv(2, 0)
      assert len(dataset) == 611
      dataset_iter = iter(dataset)
      assert len(dataset_iter) == 611
      process_1_1 = list(dataset_iter)
      assert process_1_1[:10] == [
          818,
          810,
          812,
          815,
          814,
          817,
          813,
          819,
          816,
          811,
      ]
      assert len(process_1_1) == 611
  
      dataset_2 = StreamingDataset(
          input_dir=str(tmpdir), shuffle=True, drop_last=drop_last
      )
      iter(dataset_2)
      assert isinstance(dataset_2.shuffler, FullShuffle)
      dataset_2.distributed_env = _DistributedEnv(2, 1)
      assert len(dataset_2) == 611
      dataset_2_iter = iter(dataset_2)
      assert len(dataset_2_iter) == 611
      process_2_1 = list(dataset_2_iter)
      assert process_2_1[:10] == [
          181,
          183,
          186,
          188,
          187,
          185,
          189,
          184,
          182,
          1092,
      ]
      assert len(process_2_1) == 611
      assert len([i for i in process_1_1 if i in process_2_1]) == 0
  
imports: import os
  import sys
  from time import sleep
  from unittest import mock
  import numpy
  import pytest
  import torch
  from lightning import seed_everything
  from lightning.data.streaming import Cache, functions
  from lightning.data.streaming.dataloader import StreamingDataLoader
  from lightning.data.streaming.dataset import _INDEX_FILENAME, Dir, RemoteDir, StreamingDataset, _associate_chunks_to_workers, _replay_chunks_sampling, _replay_sampling, _should_replace_path, _try_create_cache_dir
  from lightning.data.streaming.item_loader import TokensLoader
  from lightning.data.streaming.shuffle import FullShuffle, NoShuffle
  from lightning.data.utilities.env import Environment, _DistributedEnv, _WorkerEnv
  from torch.utils.data import DataLoader
label_desc: Use image node_id 5 for calling a global function with example usage: test_streaming_dataset_distributed_full_shuffle_even(drop_last, tmpdir) without return types