code: def test_register_constructor_from_entrypoints_and_call(
      dataset_registry, tmp_path
  ):  # pylint: disable=unused-argument
      """This test requires the package in tests/resources/mlflow-test-plugin to be installed"""
  
      from mlflow_test_plugin.dummy_dataset import DummyDataset
  
      dataset_registry.register_entrypoints()
  
      dataset = mlflow.data.from_dummy(
          data_list=[1, 2, 3],
          # Use a DummyDatasetSource URI from mlflow_test_plugin.dummy_dataset_source, which
          # is registered as an entrypoint whenever mlflow-test-plugin is installed
          source="dummy:" + str(tmp_path),
          name="dataset_name",
          digest="foo",
      )
      assert isinstance(dataset, DummyDataset)
      assert dataset.data_list == [1, 2, 3]
      assert dataset.name == "dataset_name"
      assert dataset.digest == "foo"
  
file_path: mlflow/tests/data/test_dataset_registry.py
imports: from typing import Optional
  from unittest import mock
  import pytest
  import mlflow.data
  from mlflow.data.dataset import Dataset
  from mlflow.data.dataset_registry import DatasetRegistry, register_constructor
  from mlflow.data.dataset_source_registry import DatasetSourceRegistry, resolve_dataset_source
  from mlflow.exceptions import MlflowException
  from tests.resources.data.dataset import TestDataset
  from tests.resources.data.dataset_source import TestDatasetSource
label_desc: Use image node_id 4 for calling a global function with example usage: test_register_constructor_from_entrypoints_and_call(dataset_registry, tmp_path) without return types