code: def test_plugin_registration_failure_via_entrypoints(exception):
      mock_entrypoint = mock.Mock(load=mock.Mock(side_effect=exception))
      mock_entrypoint.name = "mock-scheme"
  
      with mock.patch(
          "entrypoints.get_group_all", return_value=[mock_entrypoint]
      ) as mock_get_group_all:
          repo_registry = ArtifactRepositoryRegistry()
  
          # Check that the raised warning contains the message from the original exception
          with pytest.warns(UserWarning, match="test exception"):
              repo_registry.register_entrypoints()
  
      mock_entrypoint.load.assert_called_once()
      mock_get_group_all.assert_called_once_with(
          "mlflow.artifact_repository"
      )
  
file_path: mlflow/tests/store/artifact/test_artifact_repository_registry.py
imports: from importlib import reload
  from unittest import mock
  import pytest
  import mlflow
  from mlflow.store.artifact import artifact_repository_registry
  from mlflow.store.artifact.artifact_repository_registry import ArtifactRepositoryRegistry
label_desc: Use image node_id 6 for calling a global function with example usage: test_plugin_registration_failure_via_entrypoints(exception) without return types