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
      model_runnable_class = 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)
          model_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 model_runnable_class
  
file_path: BentoML/src/bentoml/_internal/frameworks/torchscript.py
imports: from __future__ import annotations
  import logging
  import typing
  from types import ModuleType
  from typing import TYPE_CHECKING
  import bentoml
  from bentoml import Tag
  from ...exceptions import NotFound
  from ..models.model import Model
  from ..models.model import ModelContext
  from ..models.model import PartialKwargsModelOptions
  from ..utils.pkg import get_pkg_version
  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: model_runnable_class