code: def get_runnable(bento_model: Model):
      """
      Private API: use :obj:`~bentoml.Model.to_runnable` instead.
      """
      from .common.pytorch import PytorchModelRunnable
      from .common.pytorch import make_pytorch_runnable_method
      from .common.pytorch import partial_class
  
      partial_kwargs: t.Dict[str, t.Any] = bento_model.info.options.partial_kwargs  # type: ignore
  
      runnable_class: type[PytorchModelRunnable] = partial_class(
          PytorchModelRunnable,
          bento_model=bento_model,
          loader=load_model,
      )
      for method_name, options in bento_model.info.signatures.items():
          method_partial_kwargs = partial_kwargs.get(method_name)
          runnable_class.add_method(
              make_pytorch_runnable_method(
                  method_name, method_partial_kwargs
              ),
              name=method_name,
              batchable=options.batchable,
              batch_dim=options.batch_dim,
              input_spec=options.input_spec,
              output_spec=options.output_spec,
          )
      return runnable_class
  
imports: from __future__ import annotations
  import logging
  import typing
  from pathlib import Path
  from types import ModuleType
  from typing import TYPE_CHECKING
  import cloudpickle
  import bentoml
  from bentoml import Tag
  from ...exceptions import NotFound
  from ..models import Model
  from ..models.model import ModelContext
  from ..models.model import PartialKwargsModelOptions
  from ..types import LazyType
  from ..utils.pkg import get_pkg_version
  from .common.pytorch import PyTorchTensorContainer
  from .common.pytorch import torch
label_desc: Use image node_id 4 for calling a global function with example usage: get_runnable(bento_model) and returns: runnable_class