code: def __init__(
      self,
      bento_model: Model,
      loader: t.Callable[..., torch.nn.Module],
  ):
      super().__init__()
      # if torch.cuda.device_count():
      if torch.cuda.is_available():
          self.device_id = "cuda"
          # by default, torch.FloatTensor will be used on CPU.
          torch.set_default_tensor_type("torch.cuda.FloatTensor")
      else:
          self.device_id = "cpu"
      self.model: ModelType = loader(
          bento_model, device_id=self.device_id
      )
      # We want to turn off dropout and batchnorm when running inference.
      self.model.train(False)
  
imports: from __future__ import annotations
  import functools
  import itertools
  import logging
  import pickle
  import typing
  from typing import TYPE_CHECKING
  from simple_di import Provide
  from simple_di import inject
  import bentoml
  from ....exceptions import MissingDependencyException
  from ...configuration.containers import BentoMLContainer
  from ...models.model import Model
  from ...runner.container import DataContainer
  from ...runner.container import DataContainerRegistry
  from ...runner.container import Payload
  from ...runner.utils import Params
  from ...types import LazyType
label_desc: Use image node_id 1 to create a new PytorchModelRunnable object from inherited base classes: bentoml with example: obj = PytorchModelRunnable(bento_model, loader)