code: def test_from_tensorflow_dataset_constructs_expected_dataset():
      x = np.random.sample((100, 2))
      tf_dataset = tf.data.Dataset.from_tensors(x)
      mlflow_ds = mlflow.data.from_tensorflow(
          tf_dataset, source="my_source"
      )
      assert isinstance(mlflow_ds, TensorFlowDataset)
      assert mlflow_ds.data == tf_dataset
      assert mlflow_ds.schema == TensorDatasetSchema(
          features=_infer_schema(next(tf_dataset.as_numpy_iterator()))
      )
      assert mlflow_ds.profile == {
          "features_cardinality": tf_dataset.cardinality().numpy(),
      }
  
imports: import json
  import numpy
  import pytest
  import tensorflow
  import mlflow.data
  from mlflow.data.code_dataset_source import CodeDatasetSource
  from mlflow.data.pyfunc_dataset_mixin import PyFuncInputsOutputs
  from mlflow.data.schema import TensorDatasetSchema
  from mlflow.data.tensorflow_dataset import TensorFlowDataset
  from mlflow.exceptions import MlflowException
  from mlflow.models.evaluation.base import EvaluationDataset
  from mlflow.types.utils import _infer_schema
  from tests.resources.data.dataset_source import TestDatasetSource
label_desc: Use image node_id 14 for calling a global function with example usage: test_from_tensorflow_dataset_constructs_expected_dataset() without return types