code: def create_test_bento_servicer(
      service: Service,
      protocol_version: str = LATEST_PROTOCOL_VERSION,
  ) -> t.Callable[[Service], t.Any]:
      try:
          module = importlib.import_module(
              f".{protocol_version}",
              package="bentoml._internal.server.grpc.servicer",
          )
          return getattr(module, "create_bento_servicer")(service)
      except (ImportError, ModuleNotFoundError):
          raise BentoMLException(
              f"Failed to load servicer implementation for version {protocol_version}"
          ) from None
  
file_path: BentoML/src/bentoml/testing/grpc/__init__.py
imports: from __future__ import annotations
  import importlib
  import traceback
  import typing
  from contextlib import ExitStack
  from contextlib import asynccontextmanager
  from typing import TYPE_CHECKING
  from ..._internal.utils import LazyLoader
  from ..._internal.utils import cached_contextmanager
  from ..._internal.utils import reserve_free_port
  from ...exceptions import BentoMLException
  from ...grpc.utils import LATEST_PROTOCOL_VERSION
  from ...grpc.utils import import_generated_stubs
  from ...grpc.utils import import_grpc
label_desc: Use image node_id 1 for calling a global function with example usage: create_test_bento_servicer(service, protocol_version) and returns: getattr