code: def test_get_mlflow_credential_context_by_run_id():
      with mock.patch(
          "mlflow.tracking.artifact_utils.get_artifact_uri",
          return_value="dbfs:/path/to/artifact",
      ) as mock_get_artifact_uri, mock.patch(
          "mlflow.utils.uri.get_databricks_profile_uri_from_artifact_uri",
          return_value="databricks://path/to/profile",
      ) as mock_get_databricks_profile, mock.patch(
          "mlflow.utils.databricks_utils.MlflowCredentialContext"
      ) as mock_credential_context:
          get_mlflow_credential_context_by_run_id(run_id="abc")
          mock_get_artifact_uri.assert_called_once_with(run_id="abc")
          mock_get_databricks_profile.assert_called_once_with(
              "dbfs:/path/to/artifact"
          )
          mock_credential_context.assert_called_once_with(
              "databricks://path/to/profile"
          )
  
imports: import builtins
  import sys
  from unittest import mock
  import pytest
  from databricks_cli.configure.provider import DatabricksConfig
  from mlflow.exceptions import MlflowException
  from mlflow.utils import databricks_utils
  from mlflow.utils.databricks_utils import check_databricks_secret_scope_access, get_mlflow_credential_context_by_run_id, get_workspace_info_from_databricks_secrets, get_workspace_info_from_dbutils, is_databricks_default_tracking_uri, is_running_in_ipython_environment
  from mlflow.utils.uri import construct_db_uri_from_profile
  from tests.helper_functions import mock_method_chain
label_desc: Use image node_id 20 for calling a global function with example usage: test_get_mlflow_credential_context_by_run_id() without return types