code: def test_route_classes():
      routes = {}
      for r in app.router.routes:
          assert isinstance(r, Route)
          routes[r.path] = r
      assert getattr(routes["/a/"], "x_type") == "A"  # noqa: B009
      assert getattr(routes["/a/b/"], "x_type") == "B"  # noqa: B009
      assert getattr(routes["/a/b/c/"], "x_type") == "C"
  
file_path: fastapi/tests/test_custom_route_class.py
imports: import pytest
  from fastapi import APIRouter, FastAPI
  from fastapi.routing import APIRoute
  from fastapi.testclient import TestClient
  from starlette.routing import Route
label_desc: Use image node_id 5 for calling a global function with example usage: test_route_classes() without return types