code: def test_set_gateway_uri(monkeypatch):
      monkeypatch.setattr("mlflow.gateway.utils._gateway_uri", None)
  
      valid_uri = "http://localhost"
      set_gateway_uri(valid_uri)
      assert get_gateway_uri() == valid_uri
  
      invalid_uri = "localhost"
      with pytest.raises(
          MlflowException,
          match="The gateway uri provided is missing required",
      ):
          set_gateway_uri(invalid_uri)
  
file_path: mlflow/tests/gateway/test_utils.py
imports: import pytest
  from mlflow.exceptions import MlflowException
  from mlflow.gateway.utils import SearchRoutesToken, _is_valid_uri, assemble_uri_path, check_configuration_route_name_collisions, get_gateway_uri, is_valid_endpoint_name, resolve_route_url, set_gateway_uri
label_desc: Use image node_id 7 for calling a global function with example usage: test_set_gateway_uri(monkeypatch) without return types