code: def test_set_deployments_target(monkeypatch):
      monkeypatch.setattr(
          "mlflow.deployments.utils._deployments_target", None
      )
  
      valid_target = "databricks"
      set_deployments_target(valid_target)
      assert get_deployments_target() == valid_target
  
      valid_uri = "http://localhost"
      set_deployments_target(valid_uri)
      assert get_deployments_target() == valid_uri
  
      invalid_uri = "localhost"
      with pytest.raises(
          MlflowException,
          match="The target provided is not a valid uri or "
          "'databricks'",
      ):
          set_deployments_target(invalid_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 1 for calling a global function with example usage: test_set_deployments_target(monkeypatch) without return types