code: def test_from_tf(ray_start_regular_shared):
      import tensorflow as tf
      import tensorflow_datasets as tfds
  
      tf_dataset = tfds.load(
          "mnist", split=["train"], as_supervised=True
      )[0]
      tf_dataset = tf_dataset.take(
          8
      )  # Use subset to make test run faster.
  
      ray_dataset = ray.data.from_tf(tf_dataset)
  
      actual_data = extract_values("item", ray_dataset.take_all())
      expected_data = list(tf_dataset)
      assert len(actual_data) == len(expected_data)
      for (expected_features, expected_label), (
          actual_features,
          actual_label,
      ) in zip(expected_data, actual_data):
          tf.debugging.assert_equal(expected_features, actual_features)
          tf.debugging.assert_equal(expected_label, actual_label)
  
imports: import os
  from typing import Iterable, List
  import pandas
  import pyarrow
  import pyarrow.parquet
  import pytest
  import torchvision
  from fsspec.implementations.http import HTTPFileSystem
  from fsspec.implementations.local import LocalFileSystem
  import ray
  from ray._private.test_utils import wait_for_condition
  from ray.data._internal.execution.interfaces import TaskContext
  from ray.data.block import Block, BlockAccessor
  from ray.data.datasource import Datasource, DummyOutputDatasource, WriteResult
  from ray.data.datasource.file_meta_provider import _handle_read_os_error
  from ray.data.tests.conftest import *
  from ray.data.tests.mock_http_server import *
  from ray.data.tests.util import extract_values
  from ray.tests.conftest import *
  from ray.types import ObjectRef
label_desc: Use image node_id 10 for calling a global function with example usage: test_from_tf(ray_start_regular_shared) without return types