code: def test_non_running_server_raises_when_called(monkeypatch):
      monkeypatch.setenv("MLFLOW_HTTP_REQUEST_MAX_RETRIES", "0")
      set_gateway_uri("http://invalid.server:6000")
      client = MlflowGatewayClient()
      with pytest.raises(
          MlflowException,
          match="API request to http://invalid.server:6000/api/2.0/gateway/routes/ failed ",
      ):
          client.search_routes()
  
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 9 for calling a global function with example usage: test_non_running_server_raises_when_called(monkeypatch) without return types