code: def test_to_evaluation_dataset():
      import numpy as np
  
      ds = datasets.load_dataset("rotten_tomatoes", split="train")
      dataset = mlflow.data.from_huggingface(
          ds, path="rotten_tomatoes", targets="label"
      )
  
      evaluation_dataset = dataset.to_evaluation_dataset()
      assert isinstance(evaluation_dataset, EvaluationDataset)
      assert evaluation_dataset.features_data.equals(
          dataset.ds.to_pandas().drop("label", axis=1)
      )
      assert np.array_equal(
          evaluation_dataset.labels_data,
          dataset.ds.to_pandas()["label"].values,
      )
  
imports: import json
  import os
  import datasets
  import pandas
  import pytest
  import mlflow.data
  import mlflow.data.huggingface_dataset
  from mlflow.data.code_dataset_source import CodeDatasetSource
  from mlflow.data.dataset_source_registry import get_dataset_source_from_json
  from mlflow.data.huggingface_dataset import HuggingFaceDataset
  from mlflow.data.huggingface_dataset_source import HuggingFaceDatasetSource
  from mlflow.exceptions import MlflowException
  from mlflow.models.evaluation.base import EvaluationDataset
  from mlflow.types.schema import Schema
  from mlflow.types.utils import _infer_schema
label_desc: Use image node_id 11 for calling a global function with example usage: test_to_evaluation_dataset() without return types