code: def test_registry_instance_loads_entrypoints():
      class MockRunContext:
          pass
  
      mock_entrypoint = mock.Mock()
      mock_entrypoint.load.return_value = MockRunContext
  
      with mock.patch(
          "entrypoints.get_group_all", return_value=[mock_entrypoint]
      ) as mock_get_group_all:
          # Entrypoints are registered at import time, so we need to reload the module to register the
          # entrypoint given by the mocked entrypoints.get_group_all
          reload(mlflow.tracking.context.registry)
  
      assert (
          MockRunContext
          in _currently_registered_run_context_provider_classes()
      )
      mock_get_group_all.assert_called_once_with(
          "mlflow.run_context_provider"
      )
  
file_path: mlflow/tests/tracking/context/test_registry.py
imports: from importlib import reload
  from unittest import mock
  import pytest
  import mlflow.tracking.context.registry
  from mlflow.tracking.context.databricks_job_context import DatabricksJobRunContext
  from mlflow.tracking.context.databricks_notebook_context import DatabricksNotebookRunContext
  from mlflow.tracking.context.databricks_repo_context import DatabricksRepoRunContext
  from mlflow.tracking.context.default_context import DefaultRunContext
  from mlflow.tracking.context.git_context import GitRunContext
  from mlflow.tracking.context.registry import RunContextProviderRegistry, resolve_tags
label_desc: Use image node_id 6 for calling a global function with example usage: test_registry_instance_loads_entrypoints() without return types