class_docstr: An async implementation of a gRPC server.
code: def on_startup(self) -> list[LifecycleHook]:
      on_startup = [
          *self.bento_service.startup_hooks,
          self.bento_service.on_grpc_server_startup,
      ]
      if BentoMLContainer.development_mode.get():
          for runner in self.bento_service.runners:
              on_startup.append(partial(runner.init_local, quiet=True))
      else:
          for runner in self.bento_service.runners:
              if runner.embedded:
                  on_startup.append(
                      partial(runner.init_local, quiet=True)
                  )
              else:
                  on_startup.append(runner.init_client)
  
      on_startup.append(self.wait_for_runner_ready)
      return on_startup
  
imports: from __future__ import annotations
  import asyncio
  import inspect
  import logging
  import os
  import sys
  import typing
  from concurrent.futures import ThreadPoolExecutor
  from functools import cached_property
  from functools import partial
  from typing import TYPE_CHECKING
  from simple_di import Provide
  from simple_di import inject
  from ...grpc.utils import LATEST_PROTOCOL_VERSION
  from ...grpc.utils import import_generated_stubs
  from ...grpc.utils import import_grpc
  from ...grpc.utils import load_from_file
  from ..configuration.containers import BentoMLContainer
  from ..context import ServiceContext
  from ..utils import LazyLoader
label_desc: Use image node_id 9 for calling the Server obj's underlying member method code with example usage: obj.on_startup() and returns: on_startup