code: def test_create_gateway_client_with_overriden_env_variable(
      gateway, monkeypatch
  ):
      monkeypatch.setenv(
          MLFLOW_GATEWAY_URI.name, "http://localhost:99999"
      )
  
      # Pass a bad env variable config in
      with pytest.raises(
          InvalidUrlException,
          match="Invalid url: http://localhost:99999/api/2.0/gateway/routes",
      ):
          MlflowGatewayClient().search_routes()
  
      # Ensure that the global variable override preempts trying the environment variable value
      set_gateway_uri(gateway_uri=gateway.url)
      gateway_client = MlflowGatewayClient()
  
      assert gateway_client.gateway_uri == gateway.url
      assert (
          gateway_client.get_route("chat").route_type == "llm/v1/chat"
      )
  
imports: from unittest import mock
  import pytest
  from requests.exceptions import HTTPError, Timeout
  import mlflow.gateway.utils
  from mlflow.environment_variables import MLFLOW_GATEWAY_URI
  from mlflow.exceptions import InvalidUrlException, MlflowException
  from mlflow.gateway import MlflowGatewayClient, set_gateway_uri
  from mlflow.gateway.config import Route
  from mlflow.gateway.constants import MLFLOW_GATEWAY_SEARCH_ROUTES_PAGE_SIZE
  from mlflow.gateway.utils import resolve_route_url
  from tests.gateway.tools import Gateway, save_yaml
label_desc: Use image node_id 13 for calling a global function with example usage: test_create_gateway_client_with_overriden_env_variable(gateway, monkeypatch) without return types