code: def test_get_deployments_target(monkeypatch):
      monkeypatch.setattr(
          "mlflow.deployments.utils._deployments_target", None
      )
      monkeypatch.delenv("MLFLOW_DEPLOYMENTS_TARGET", raising=False)
  
      with pytest.raises(
          MlflowException, match="No deployments target has been set"
      ):
          get_deployments_target()
  
      valid_uri = "http://localhost"
      monkeypatch.setattr(
          "mlflow.deployments.utils._deployments_target", valid_uri
      )
      assert get_deployments_target() == valid_uri
  
      monkeypatch.delenv("MLFLOW_DEPLOYMENTS_TARGET", raising=False)
      set_deployments_target(valid_uri)
      assert get_deployments_target() == valid_uri
  
imports: import pytest
  from mlflow.deployments.utils import get_deployments_target, set_deployments_target
  from mlflow.exceptions import MlflowException
label_desc: Use image node_id 2 for calling a global function with example usage: test_get_deployments_target(monkeypatch) without return types