code: def get_runnable(
      bento_model: bentoml.Model,
  ) -> type[bentoml.Runnable]:
      """
      Private API: use :obj:`~bentoml.Model.to_runnable` instead.
      """
  
      class EasyOCRRunnable(bentoml.Runnable):
          SUPPORTED_RESOURCES = ("nvidia.com/gpu", "cpu")
          SUPPORTS_CPU_MULTI_THREADING = True
  
          def __init__(self):
              super().__init__()
  
              self.model = load_model(bento_model)
  
              self.predict_fns: dict[str, t.Callable[..., t.Any]] = {}
              for method_name in bento_model.info.signatures:
                  self.predict_fns[method_name] = getattr(
                      self.model, method_name
                  )
  
      def add_runnable_method(
          method_name: str, options: ModelSignature
      ):
          def _run(
              self: EasyOCRRunnable, *args: t.Any, **kwargs: t.Any
          ) -> t.Any:
              return self.predict_fns[method_name](*args, **kwargs)
  
          EasyOCRRunnable.add_method(
              _run,
              name=method_name,
              batchable=options.batchable,
              batch_dim=options.batch_dim,
              input_spec=options.input_spec,
              output_spec=options.output_spec,
          )
  
      for method_name, options in bento_model.info.signatures.items():
          add_runnable_method(method_name, options)
  
      return EasyOCRRunnable
  
file_path: BentoML/grpc-client/bentoml/_internal/frameworks/easyocr.py
imports: from __future__ import annotations
  import logging
  import typing
  from types import ModuleType
  import cloudpickle
  import bentoml
  from ...exceptions import MissingDependencyException
  from ...exceptions import NotFound
  from ..models.model import Model
  from ..models.model import ModelContext
  from ..models.model import ModelOptions
  from ..models.model import ModelSignature
  from ..tag import Tag
  from ..utils.pkg import get_pkg_version
  from .common.pytorch import PyTorchTensorContainer
label_desc: Use image node_id 4 for calling a global function with example usage: get_runnable(bento_model) and returns: EasyOCRRunnable, self