code: def test_update_routes(
      mocked_router, target_route1, target_route2, request
  ):
      router = request.getfixturevalue(mocked_router)
      router.update_routes(
          {
              EndpointTag("endpoint", "app1"): EndpointInfo(
                  route="/endpoint"
              )
          }
      )
  
      route, handle, app_is_cross_language = get_handle_function(
          router
      )(target_route1)
      assert all(
          [
              route == "/endpoint",
              handle == "endpoint",
              not app_is_cross_language,
          ]
      )
  
      router.update_routes(
          {
              EndpointTag("endpoint2", "app2"): EndpointInfo(
                  route="/endpoint2",
                  app_is_cross_language=True,
              ),
              EndpointTag("endpoint3", "app3"): EndpointInfo(
                  route="/endpoint3",
                  app_is_cross_language=True,
              ),
          }
      )
  
      assert get_handle_function(router)(target_route1) is None
  
      route, handle, app_is_cross_language = get_handle_function(
          router
      )(target_route2)
      assert all(
          [
              route == "/endpoint2",
              handle == "endpoint2",
              app_is_cross_language,
          ]
      )
  
file_path: ray/python/ray/serve/tests/test_proxy_router.py
imports: from typing import Callable
  import pytest
  from ray.serve._private.common import EndpointInfo, EndpointTag, RequestProtocol
  from ray.serve._private.proxy_router import EndpointRouter, LongestPrefixRouter, ProxyRouter
label_desc: Use image node_id 8 for calling a global function with example usage: test_update_routes(mocked_router, target_route1, target_route2, request) without return types