code: def check(
      ds,
      chunk_sizes=tuple(),
      expected_records=0,
      expected_pad=0,
      expected_record_sizes=None,
  ):
      """Check datastore size after multiple items written."""
      record_sizes = []
      for _, chunk_size in enumerate(chunk_sizes):
          size = ds._write_data(b"\x01" * chunk_size)
          record_sizes.append(size)
      num = 7 + sum(chunk_sizes) + expected_records * 7 + expected_pad
      ds.close()
      s = os.stat(FNAME)
      assert s.st_size == num
      if expected_record_sizes is not None:
          assert tuple(record_sizes) == expected_record_sizes
  
file_path: wandb/tests/pytest_tests/unit_tests/test_datastore.py
imports: import json
  import os
  import pytest
  import wandb
  from wandb.proto import wandb_internal_pb2
label_desc: Use image node_id 1 for calling a global function with example usage: check(ds, chunk_sizes, expected_records, expected_pad, expected_record_sizes) without return types