code: def test_search_routes_returns_expected_pages(tmp_path):
      conf = tmp_path / "config.yaml"
      base_route_config = {
          "route_type": "llm/v1/completions",
          "model": {
              "name": "text-davinci-003",
              "provider": "openai",
              "config": {
                  "openai_api_key": "mykey",
                  "openai_api_base": "https://api.openai.com/v1",
                  "openai_api_version": "2023-05-10",
                  "openai_api_type": "openai",
              },
          },
      }
      num_routes = MLFLOW_GATEWAY_SEARCH_ROUTES_PAGE_SIZE + 5
      gateway_route_names = [f"route_{i}" for i in range(num_routes)]
      gateway_config_dict = {
          "routes": [
              {"name": route_name, **base_route_config}
              for route_name in gateway_route_names
          ]
      }
      save_yaml(conf, gateway_config_dict)
      with Gateway(conf) as gateway:
          gateway_client = MlflowGatewayClient(gateway_uri=gateway.url)
          routes_page_1 = gateway_client.search_routes()
          assert [
              route.name for route in routes_page_1
          ] == gateway_route_names[
              :MLFLOW_GATEWAY_SEARCH_ROUTES_PAGE_SIZE
          ]
          assert routes_page_1.token
  
          routes_page_2 = gateway_client.search_routes(
              page_token=routes_page_1.token
          )
          assert len(routes_page_2) == 5
          assert [
              route.name for route in routes_page_2
          ] == gateway_route_names[
              MLFLOW_GATEWAY_SEARCH_ROUTES_PAGE_SIZE:
          ]
          assert routes_page_2.token is None
  
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 17 for calling a global function with example usage: test_search_routes_returns_expected_pages(tmp_path) without return types