code: def test_to_evaluation_dataset():
      source_uri = "test:/my/test/uri"
      source = TestDatasetSource._resolve(source_uri)
      features = np.array([[1, 2], [3, 4]])
      targets = np.array([0, 1])
      dataset = NumpyDataset(
          features=features,
          targets=targets,
          source=source,
          name="testname",
      )
      evaluation_dataset = dataset.to_evaluation_dataset()
      assert isinstance(evaluation_dataset, EvaluationDataset)
      assert np.array_equal(evaluation_dataset.features_data, features)
      assert np.array_equal(evaluation_dataset.labels_data, targets)
  
imports: import json
  import numpy
  import pandas
  import pytest
  import mlflow.data
  from mlflow.data.code_dataset_source import CodeDatasetSource
  from mlflow.data.filesystem_dataset_source import FileSystemDatasetSource
  from mlflow.data.numpy_dataset import NumpyDataset
  from mlflow.data.pyfunc_dataset_mixin import PyFuncInputsOutputs
  from mlflow.data.schema import TensorDatasetSchema
  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 8 for calling a global function with example usage: test_to_evaluation_dataset() without return types