code: def optimize_no_trace(model, data_type="fp16"):
      model = detect_and_swap_bert_model(
          model,
          data_type="fp16",
          lib_path=lib_path,
          remove_padding=False,
      )
      if data_type == "fp16":
          logger.info("Use fp16")
          model.half()
      elif data_type == "bf16":
          logger.info("Use bf16")
          model.bfloat16()
      return model.to(device)
  
file_path: nebuly/optimization/speedster/notebooks/huggingface/faster_transformer_bert.py
imports: import logging
  import random
  import time
  import speedster
  import torch
  from speedster import optimize_model
  from nebullvm.operations.optimizations.compilers.faster_transformer.bert import detect_and_swap_bert_model
  from nebullvm.operations.optimizations.compilers.utils import get_faster_transformer_repo_path
  from transformers import BertTokenizer
  from transformers.models.bert.modeling_bert import BertForSequenceClassification
label_desc: Use image node_id 2 for calling a global function with example usage: optimize_no_trace(model, data_type) and returns: model