code: def _compile_model(
      self,
      model: torch.nn.Module,
      input_data: DataManager,
      quantization_type: QuantizationType,
      dynamic_batch_size: bool,
  ) -> torch.jit.ScriptModule:
      input_sample = input_data.get_list(1)[0]
      if self.device.type is DeviceType.GPU:
          if quantization_type is QuantizationType.HALF:
              input_sample = [
                  t.to(self.device.to_torch_format()).half()
                  if torch.is_floating_point(t)
                  else t.to(self.device.to_torch_format())
                  for t in input_sample
              ]
          else:
              input_sample = [
                  t.to(self.device.to_torch_format())
                  for t in input_sample
              ]
          model.to(self.device.to_torch_format())
      model.eval()
  
      try:
          model_scripted = symbolic_trace(model)
          model_scripted = torch_neuron.trace(
              model_scripted,
              input_sample,
              dynamic_batch_size=dynamic_batch_size,
              compiler_args=["--fast-math", "none"]
              if quantization_type is None
              else None,
          )
      except Exception:
          try:
              model_scripted = torch_neuron.trace(
                  model,
                  input_sample,
                  dynamic_batch_size=dynamic_batch_size,
                  compiler_args=["--fast-math", "none"]
                  if quantization_type is None
                  else None,
              )
          except Exception:
              raise RuntimeError(
                  "Unable to trace model with torch_neuron."
              )
  
      return model_scripted
  
file_path: nebuly/optimization/nebullvm/nebullvm/operations/optimizations/compilers/torch_neuron.py
imports: from typing import List, Tuple
  from nebullvm.core.models import QuantizationType, ModelParams, DeviceType
  from nebullvm.operations.optimizations.compilers.base import Compiler
  from nebullvm.operations.optimizations.compilers.quantizations.utils import check_quantization
  from nebullvm.optional_modules.torch import torch, symbolic_trace
  from nebullvm.optional_modules.torch_neuron import torch_neuron
  from nebullvm.tools.data import DataManager
  from nebullvm.tools.transformations import MultiStageTransformation
label_desc: Use image node_id 3 for calling the TorchNeuronCompiler obj's underlying member method code with example usage: obj._compile_model(model, input_data, quantization_type, dynamic_batch_size) and returns: model_scripted