code: def test_write_invalid_tfrecords(ray_start_regular_shared, tmp_path):
      """
      If we try to write a dataset with invalid TFRecord datatypes,
      ValueError should be raised.
      """
  
      ds = ray.data.from_items([{"item": None}])
  
      with pytest.raises(ValueError):
          ds.write_tfrecords(tmp_path)
  
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 13 for calling a global function with example usage: test_write_invalid_tfrecords(ray_start_regular_shared, tmp_path) without return types