code: def test_shuffle_per_row_group(scalar_dataset):
      """Check if every row group is shuffled."""
      for reader_factory in [make_batch_reader, make_reader]:
          with reader_factory(
              scalar_dataset.url,
              reader_pool_type="dummy",
              shuffle_rows=True,
              shuffle_row_groups=False,
          ) as reader:
              row_ids_batched = [row.id for row in reader]
          if reader_factory == make_batch_reader:
              actual_row_ids = list(itertools.chain(*row_ids_batched))
          else:
              # No need to unbatch
              actual_row_ids = row_ids_batched
  
          assert len(scalar_dataset.data) == len(actual_row_ids)
          # Row ids are shuffled in output
          assert not np.array_equal(
              list(np.arange(len(scalar_dataset.data))), actual_row_ids
          )
  
imports: import glob
  import itertools
  import numpy
  import pandas
  import pytest
  from pyarrow import parquet
  from petastorm import make_batch_reader, make_reader
  from petastorm.arrow_reader_worker import ArrowReaderWorker
  from petastorm.tests.test_common import create_test_scalar_dataset
  from petastorm.transform import TransformSpec
  from petastorm.unischema import UnischemaField
label_desc: Use image node_id 13 for calling a global function with example usage: test_shuffle_per_row_group(scalar_dataset) without return types