code: def test_write_shuffle():
      length = 600
      with NamedTemporaryFile() as handle:
          name = handle.name
          dataset = DummyDataset(length)
  
          writer = DatasetWriter(
              name, {"index": IntField(), "value": FloatField()}
          )
  
          writer.from_indexed_dataset(dataset, shuffle_indices=True)
  
          validate_simple_dataset(name, length, shuffled=True)
  
imports: import numpy
  from assertpy import assert_that
  from numpy.random import shuffle
  from torch.utils.data import Dataset
  import logging
  import os
  from assertpy import assert_that
  from tempfile import NamedTemporaryFile
  from multiprocessing import cpu_count
  from ffcv.writer import DatasetWriter
  from ffcv.reader import Reader
  from ffcv.fields import IntField, FloatField, BytesField
label_desc: Use image node_id 2 for calling a global function with example usage: test_write_shuffle() without return types