code: def run_atds_benchmark_from_data_source(
      data_source,
      batch_size,
      benchmark,
      parallelism=tf.data.AUTOTUNE,
      interleave_parallelism=0,
      codec="null",
      shuffle_buffer_size=0,
      rounds=30,
  ):
      with ATDSWriter(codec=codec) as writer:
          dir_path = writer.write(data_source)
          pattern = os.path.join(dir_path, f"*.{writer.extension}")
  
          dataset = get_dataset(
              glob.glob(pattern),
              get_features_from_data_source(writer, data_source),
              batch_size=batch_size,
              shuffle_buffer_size=shuffle_buffer_size,
              parallelism=parallelism,
              interleave_parallelism=interleave_parallelism,
          )
          count = benchmark.pedantic(
              target=benchmark_func,
              args=[dataset],
              iterations=2,
              # pytest-benchmark calculates statistic across rounds. Set it with
              # larger number (N > 30) for test statistic.
              rounds=rounds,
              kwargs={},
          )
          assert (
              count > 0
          ), f"ATDS record count: {count} must be greater than 0"
  
file_path: io/tests/test_atds_avro/utils/atds_benchmark_utils.py
imports: import avro.schema
  import glob
  import json
  import os
  import tensorflow
  from tests.test_atds_avro.utils.data_source import DataSource
  from tests.test_atds_avro.utils.data_source_registry import SMALL_NUM_RECORDS, get_canonical_name, get_data_source_from_registry
  from tests.test_atds_avro.utils.generator.tensor_generator import IntTensorGenerator, FloatTensorGenerator, WordTensorGenerator, BoolTensorGenerator
  from tests.test_atds_avro.utils.generator.sparse_tensor_generator import IntSparseTensorGenerator, FloatSparseTensorGenerator, WordSparseTensorGenerator, BoolSparseTensorGenerator, get_common_value_dist
  from tests.test_atds_avro.utils.generator.varlen_tensor_generator import IntVarLenTensorGenerator, FloatVarLenTensorGenerator, WordVarLenTensorGenerator, BoolVarLenTensorGenerator
  from tensorflow_io.python.experimental.atds.dataset import ATDSDataset
  from tests.test_atds_avro.utils.atds_writer import ATDSWriter
  from tests.test_atds_avro.utils.benchmark_utils import benchmark_func
label_desc: Use image node_id 5 for calling a global function with example usage: run_atds_benchmark_from_data_source(data_source, batch_size, benchmark, parallelism, interleave_parallelism, codec, shuffle_buffer_size, rounds) without return types