code: def test_seq_dataset_shuffle(dense_dataset, sparse_dataset):
      # not shuffled
      for i in range(5):
          _, _, _, idx1 = dense_dataset._next_py()
          _, _, _, idx2 = sparse_dataset._next_py()
          assert idx1 == i
          assert idx2 == i
  
      for i in [132, 50, 9, 18, 58]:
          _, _, _, idx1 = dense_dataset._random_py()
          _, _, _, idx2 = sparse_dataset._random_py()
          assert idx1 == i
          assert idx2 == i
  
      seed = 77
      dense_dataset._shuffle_py(seed)
      sparse_dataset._shuffle_py(seed)
  
      idx_next = [63, 91, 148, 87, 29]
      idx_shuffle = [137, 125, 56, 121, 127]
      for i, j in zip(idx_next, idx_shuffle):
          _, _, _, idx1 = dense_dataset._next_py()
          _, _, _, idx2 = sparse_dataset._next_py()
          assert idx1 == i
          assert idx2 == i
  
          _, _, _, idx1 = dense_dataset._random_py()
          _, _, _, idx2 = sparse_dataset._random_py()
          assert idx1 == j
          assert idx2 == j
  
file_path: scikit-learn/sklearn/utils/tests/test_seq_dataset.py
imports: from itertools import product
  import numpy
  import pytest
  from numpy.testing import assert_array_equal
  from sklearn.datasets import load_iris
  from sklearn.utils._seq_dataset import ArrayDataset32, ArrayDataset64, CSRDataset32, CSRDataset64
  from sklearn.utils._testing import assert_allclose
  from sklearn.utils.fixes import CSR_CONTAINERS
label_desc: Use image node_id 8 for calling a global function with example usage: test_seq_dataset_shuffle(dense_dataset, sparse_dataset) without return types