code: def test_readback_tfrecords_empty_features(
      ray_start_regular_shared,
      tmp_path,
      with_tf_schema,
  ):
      """
      Test reading back TFRecords written using datasets.
      The dataset we read back should be the same that we wrote.
      """
  
      # The dataset we will write to a .tfrecords file.
      ds = ray.data.from_items(data_empty(with_tf_schema))
      if not with_tf_schema:
          with pytest.raises(ValueError):
              # With no schema specified, this should fail because
              # type inference on completely empty columns is ambiguous.
              ds.write_tfrecords(tmp_path)
      else:
          ds = ray.data.from_items(
              data_empty(with_tf_schema), parallelism=1
          )
          expected_records = tf_records_empty()
  
          features = expected_records[0].features
          tf_schema = _features_to_schema(features)
  
          # Write the TFRecords.
          ds.write_tfrecords(tmp_path, tf_schema=tf_schema)
  
          # Read the TFRecords.
          readback_ds = ray.data.read_tfrecords(
              tmp_path,
              tf_schema=tf_schema,
              parallelism=1,
          )
          _ds_eq_streaming(ds, readback_ds)
  
imports: import json
  import os
  from typing import TYPE_CHECKING
  import numpy
  import pytest
  from pandas.api.types import is_float_dtype, is_int64_dtype, is_object_dtype
  import ray
  from ray.tests.conftest import *
label_desc: Use image node_id 12 for calling a global function with example usage: test_readback_tfrecords_empty_features(ray_start_regular_shared, tmp_path, with_tf_schema) without return types