code: def run_tfrecords_benchmark(benchmark: Benchmark):
      # Set global random seed.
      random.seed(42)
  
      test_input = [
          generate_tfrecords_from_images(
              100, [(256, 256)], ["RGB"], ["jpg"]
          ),
          generate_tfrecords_from_images(
              100, [(2048, 2048)], ["RGB"], ["jpg"]
          ),
          generate_tfrecords_from_images(
              1000,
              [(64, 64), (256, 256)],
              ["RGB"],
              ["jpg", "jpeg", "png"],
          ),
          generate_random_tfrecords(1024 * 1024 * 10, num_int=100),
          generate_random_tfrecords(1024 * 1024 * 10, num_float=100),
          generate_random_tfrecords(
              1024 * 1024, num_bytes=10, bytes_size=100
          ),
      ]
  
      try:
          benchmark.run_materialize_ds(
              "tfrecords-images-100-256",
              read_tfrecords,
              path=test_input[0],
          )
          benchmark.run_materialize_ds(
              "tfrecords-images-100-2048",
              read_tfrecords,
              path=test_input[1],
          )
          benchmark.run_materialize_ds(
              "tfrecords-images-1000-mix",
              read_tfrecords,
              path=test_input[2],
          )
          benchmark.run_materialize_ds(
              "tfrecords-random-int-1g",
              read_tfrecords,
              path=test_input[3],
          )
          benchmark.run_materialize_ds(
              "tfrecords-random-float-1g",
              read_tfrecords,
              path=test_input[4],
          )
          benchmark.run_materialize_ds(
              "tfrecords-random-bytes-1g",
              read_tfrecords,
              path=test_input[5],
          )
  
      finally:
          for root in test_input:
              shutil.rmtree(root)
  
file_path: ray/release/nightly_tests/dataset/read_tfrecords_benchmark.py
imports: import random
  import shutil
  import tempfile
  from typing import List, Tuple
  import ray
  from ray.data.dataset import Dataset
  from benchmark import Benchmark
  from read_images_benchmark import generate_images
  import pyarrow
  import numpy
label_desc: Use image node_id 4 for calling a global function with example usage: run_tfrecords_benchmark(benchmark) without return types