code: def test_convert_route_config_to_routes_payload(
      basic_config_dict, tmp_path
  ):
      conf_path = tmp_path.joinpath("config.yaml")
      conf_path.write_text(yaml.safe_dump(basic_config_dict))
      loaded = _load_route_config(conf_path)
  
      assert all(
          isinstance(route, RouteConfig) for route in loaded.routes
      )
  
      routes = [r.to_route() for r in loaded.routes]
  
      for config in loaded.routes:
          route = [x for x in routes if x.name == config.name][0]
          assert route.route_type == config.route_type
          assert route.model.name == config.model.name
          assert route.model.provider == config.model.provider
          # Pydantic doesn't allow undefined elements to be a part of its serialized object.
          # This test is a guard for devs only in case we inadvertently add sensitive keys to the
          # Route definition that would be returned via the GetRoute or SearchRoutes APIs
          assert not hasattr(route.model, "config")
  
file_path: mlflow/tests/gateway/test_gateway_config_parsing.py
imports: import re
  import warnings
  import pytest
  import yaml
  from mlflow.exceptions import MlflowException
  from mlflow.gateway.config import AnthropicConfig, OpenAIConfig, RouteConfig, _load_route_config, _resolve_api_key_from_input, _save_route_config
  from mlflow.gateway.utils import assemble_uri_path
label_desc: Use image node_id 6 for calling a global function with example usage: test_convert_route_config_to_routes_payload(basic_config_dict, tmp_path) without return types