class_docstr: Router that matches endpoint to return the handle.
class_docstr_tok: ["Router","that","matches","endpoint","to","return","the","handle","."]
code: def __init__(self, get_handle: Callable, protocol: RequestProtocol):
      # Function to get a handle given a name. Used to mock for testing.
      self._get_handle = get_handle
      # Protocol to config handle
      self._protocol = protocol
      # Contains a ServeHandle for each endpoint.
      self.handles: Dict[EndpointTag, RayServeHandle] = dict()
      # Endpoints info associated with endpoints.
      self.endpoints: Dict[EndpointTag, EndpointInfo] = dict()
  
file_path: ray/python/ray/serve/_private/proxy_router.py
imports: import logging
  from abc import ABC, abstractmethod
  from typing import Callable, Dict, List, Optional, Tuple
  from ray.serve._private.common import ApplicationName, EndpointInfo, EndpointTag, RequestProtocol
  from ray.serve._private.constants import RAY_SERVE_PROXY_PREFER_LOCAL_NODE_ROUTING, SERVE_LOGGER_NAME
  from ray.serve.handle import RayServeHandle
label_desc: Use image node_id 1 to create a new EndpointRouter object from inherited base classes: ProxyRouter with example: obj = EndpointRouter(get_handle, protocol)