code: def test_replay_sampling():
      assert _replay_sampling(27, 8, 2) == {
          0: 16,
          1: 11,
      }  # {0: 8 + 8, 1: 8 + 3}
      assert _replay_sampling(27, 7, 2) == {
          0: 14,
          1: 13,
      }  # {0: 7 + 7, 1: 7 + 6}
      assert _replay_sampling(27, 6, 2) == {
          0: 15,
          1: 12,
      }  # {0: 6 + 6 + 3, 1: 6 + 6}
      assert _replay_sampling(27, 5, 2) == {
          0: 15,
          1: 12,
      }  # {0: 5 + 5 + 5, 1: 5 + 5 + 2}
      assert _replay_sampling(27, 4, 2) == {
          0: 15,
          1: 12,
      }  # {0: 4 + 4 + 4 + 3, 1: 4 + 4 + 4}
      assert _replay_sampling(27, 8, 3) == {
          0: 11,
          1: 8,
          2: 8,
      }  # {0: 8 + 3, 1: 8, 2: 8}
      assert _replay_sampling(27, 4, 3) == {0: 11, 1: 8, 2: 8}
  
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 17 for calling a global function with example usage: test_replay_sampling() without return types