code: def test_asymetric_parquet_pieces(reader_factory, tmpdir):
      """Check that datasets with parquet files that all rows in datasets that have different number of rowgroups can
      be fully read"""
      url = "file://" + tmpdir.strpath
  
      ROWS_COUNT = 1000
      # id_div_700 forces asymetric split between partitions and hopefully get us files with different number of row
      # groups
      create_test_scalar_dataset(
          url, ROWS_COUNT, partition_by=["id_div_700"]
      )
  
      # We verify we have pieces with different number of row-groups
      dataset = pq.ParquetDataset(tmpdir.strpath)
      row_group_counts = set(
          piece.get_metadata().num_row_groups
          for piece in dataset.pieces
      )
      assert len(row_group_counts) > 1
  
      # Make sure we are not missing any rows.
      with reader_factory(url, schema_fields=["id"]) as reader:
          row_ids_batched = [row.id for row in reader]
          actual_row_ids = list(itertools.chain(*row_ids_batched))
  
      assert ROWS_COUNT == len(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 8 for calling a global function with example usage: test_asymetric_parquet_pieces(reader_factory, tmpdir) without return types