docstr: Setup routes for Runner server, including:
  
  /healthz        liveness probe endpoint
  /readyz         Readiness probe endpoint
  /metrics        Prometheus metrics endpoint
  
  For method in self.runner.runner_methods:
  /{method.name}  Run corresponding runnable method
  /               Run the runnable method "__call__" if presented
docstr_tok: ["Setup","routes","for","Runner","server",",","including",":","\/healthz","liveness","probe","endpoint","\/readyz","Readiness","probe","endpoint","\/metrics","Prometheus","metrics","endpoint","For","method","in","self.runner.runner_methods",":","\/","{","method.name","}","Run","corresponding","runnable","method","\/","Run","the","runnable","method","``","__call__","''","if","presented"]
code: def routes(self) -> t.List[BaseRoute]:
      """
      Setup routes for Runner server, including:
  
      /healthz        liveness probe endpoint
      /readyz         Readiness probe endpoint
      /metrics        Prometheus metrics endpoint
  
      For method in self.runner.runner_methods:
      /{method.name}  Run corresponding runnable method
      /               Run the runnable method "__call__" if presented
      """
      from starlette.routing import Route
  
      routes = super().routes
      for method in self.runner.runner_methods:
          path = "/" if method.name == "__call__" else "/" + method.name
          routes.append(
              Route(
                  path=path,
                  endpoint=self._mk_request_handler(
                      method, method.config.batchable
                  ),
                  methods=["POST"],
              )
          )
      return routes
  
imports: from __future__ import annotations
  import functools
  import json
  import logging
  import pickle
  import traceback
  import typing
  from typing import TYPE_CHECKING
  from simple_di import Provide
  from simple_di import inject
  from bentoml.exceptions import BentoMLException
  from bentoml.exceptions import ServiceUnavailable
  from ..configuration.containers import BentoMLContainer
  from ..context import component_context
  from ..context import trace_context
  from ..marshal.dispatcher import CorkDispatcher
  from ..runner.container import AutoContainer
  from ..runner.container import Payload
  from ..runner.utils import PAYLOAD_META_HEADER
  from ..runner.utils import Params
  from ..runner.utils import payload_paramss_to_batch_params
  from ..server.base_app import BaseAppFactory
  from ..types import LazyType
  from ..utils.metrics import exponential_buckets
label_desc: Use image node_id 6 for calling the RunnerAppFactory obj's underlying member method code with example usage: obj.routes() and returns: routes