code: def __init__(
      self,
      torch_model: ScriptModule,
      device: Device,
      **kwargs,
  ):
      super().__init__(**kwargs)
      self.model = torch_model.eval()
      if device.type is DeviceType.GPU:
          self.model.to(device.to_torch_format())
          self.use_gpu = True
      else:
          self.use_gpu = False
      self.device = device
      self._is_gpu_ready = device.type is DeviceType.GPU
  
imports: import json
  import os
  from abc import ABC
  from pathlib import Path
  from tempfile import TemporaryDirectory
  from typing import Any, Union, Dict, Type, List, Tuple, Generator, Optional
  import numpy
  from loguru import logger
  from nebullvm.config import NVIDIA_FILENAMES
  from nebullvm.core.models import Device, DeviceType, ModelParams, DeepLearningFramework
  from nebullvm.operations.inference_learners.base import BaseInferenceLearner, LearnerMetadata, PytorchBaseInferenceLearner, TensorflowBaseInferenceLearner, NumpyBaseInferenceLearner
  from nebullvm.optional_modules.tensorflow import tensorflow
  from nebullvm.optional_modules.tensor_rt import tensorrt, polygraphy
  from nebullvm.optional_modules.torch import torch, ScriptModule
  from nebullvm.tools.data import DataManager
  from nebullvm.tools.transformations import MultiStageTransformation, VerifyContiguity
label_desc: Use image node_id 1 to create a new PytorchTensorRTInferenceLearner object from inherited base classes: PytorchBaseInferenceLearner with example: obj = PytorchTensorRTInferenceLearner(torch_model, device)