code: def test_api_key_parsing_file(tmp_path):
      key_path = tmp_path.joinpath("api.key")
      config = {
          "routes": [
              {
                  "name": "claude-chat",
                  "route_type": "llm/v1/chat",
                  "model": {
                      "name": "claude-v1",
                      "provider": "anthropic",
                      "config": {
                          "anthropic_api_key": str(key_path),
                      },
                  },
              },
          ]
      }
  
      key_path.write_text("abc")
      config_path = tmp_path.joinpath("config.yaml")
      config_path.write_text(yaml.safe_dump(config))
      loaded_config = _load_route_config(config_path)
  
      assert isinstance(
          loaded_config.routes[0].model.config, AnthropicConfig
      )
      assert (
          loaded_config.routes[0].model.config.anthropic_api_key
          == "abc"
      )
  
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 4 for calling a global function with example usage: test_api_key_parsing_file(tmp_path) without return types