code: def get_runnable(
      bento_model: bentoml.Model,
  ) -> t.Type[bentoml.Runnable]:
      """
      Private API: use :obj:`~bentoml.Model.to_runnable` instead.
      """
      assert "predict" in bento_model.info.signatures
      predict_signature = bento_model.info.signatures["predict"]
  
      class MLflowPyfuncRunnable(bentoml.Runnable):
          # The only case that multi-threading may not be supported is when user define a
          # custom python_function MLflow model with pure python code, but there's no way
          # of telling that from the MLflow model metadata. It should be a very rare case,
          # because most custom python_function models are likely numpy code or model
          # inference with pre/post-processing code.
          SUPPORTED_RESOURCES = ("cpu",)
          SUPPORTS_CPU_MULTI_THREADING = True
  
          def __init__(self):
              super().__init__()
              self.model = load_model(bento_model)
  
          @bentoml.Runnable.method(
              batchable=predict_signature.batchable,
              batch_dim=predict_signature.batch_dim,
              input_spec=None,
              output_spec=None,
          )
          def predict(self, input_data: t.Any) -> t.Any:
              return self.model.predict(input_data)
  
      return MLflowPyfuncRunnable
  
file_path: BentoML/grpc-client/bentoml/_internal/frameworks/mlflow.py
imports: from __future__ import annotations
  import logging
  import os
  import shutil
  import tempfile
  import typing
  from typing import TYPE_CHECKING
  import bentoml
  from bentoml import Tag
  from bentoml.exceptions import BentoMLException
  from bentoml.exceptions import MissingDependencyException
  from bentoml.exceptions import NotFound
  from bentoml.models import ModelContext
label_desc: Use image node_id 4 for calling a global function with example usage: get_runnable(bento_model) and returns: MLflowPyfuncRunnable, self