code: def test_element_spec_dtype(self, data, expected_dtype):
      ds = ray.data.from_items([{"spam": data, "ham": data}])
  
      dataset = ds.to_tf(feature_columns="spam", label_columns="ham")
  
      feature_spec, label_spec = dataset.element_spec
      assert feature_spec.dtype == expected_dtype
      assert label_spec.dtype == expected_dtype
  
file_path: ray/python/ray/data/tests/test_tf.py
imports: import numpy
  import pandas
  import pytest
  import tensorflow
  import ray
  from ray import train
  from ray.data.preprocessors import Concatenator
  from ray.train import ScalingConfig
  from ray.train.tensorflow import TensorflowTrainer
label_desc: Use image node_id 5 for calling the TestToTF obj's underlying member method code with example usage: obj.test_element_spec_dtype(data, expected_dtype) without return types